SlideShare une entreprise Scribd logo
1  sur  7
10.2. Audio with SD Card
Oum Saokosal
Master of Engineering in Information Systems, South Korea
855-12-252-752
oum_saokosal@yahoo.com
Upload to SD Card of the Emulator
• Normally when you run the app on an Android
device, you will need to play a song from the
sdcard of the device.
• To place the song to the sdcard, simply copy it
and paste.
• However, to test it on the Emulator, you need
to push the file to the the Emulator.
See how-to in the next slide.
I. Create size for sdcard:
1. Go to AVD Manager
(Window -> AVD
Manager)
2. Click on your avd
(e.g.avd.2.3.3) -> Edit
3. Enter a size: 1000 for the
SD Card
4. Click Enter AVD to finish.
II. Upload a file to SD Card:
1. Go to DDMS -> File Explorer
2. In case you can't see the file, please run the Emulator first.
3. Browse to mnt/sdcard
4. Click on the button call "Push a file onto the device" to upload.
Play a Song from SD Card
• To play an embedded song:
MediaPlayer mp;
mp = MediaPlayer.create(this, R.raw.song1));
• To play a song from SD Card:
MediaPlayer mp;
mp = MediaPlayer.create(this,
Uri.parse("/sdcard/More Than I Can Say.mp3"));
• To Play with setDataSource() method:
MediaPlayer mp;
mp = new MediaPlayer();
try{
mp.reset();
mp.setDataSource("/sdcard/I love you.mp3");
mp.prepare();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalStateException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
mp.start();
Go on to the next slide

Contenu connexe

Tendances (8)

Irls571 Project1!
Irls571 Project1!Irls571 Project1!
Irls571 Project1!
 
Steps for Installation of Windows 7
Steps for Installation of Windows 7Steps for Installation of Windows 7
Steps for Installation of Windows 7
 
Windows 7 installation
Windows 7 installationWindows 7 installation
Windows 7 installation
 
Readme
ReadmeReadme
Readme
 
How to Change Boot Orders in BIOS
How to Change Boot Orders in BIOSHow to Change Boot Orders in BIOS
How to Change Boot Orders in BIOS
 
Configuring startup and troubleshooting startup issues
Configuring startup and troubleshooting startup issuesConfiguring startup and troubleshooting startup issues
Configuring startup and troubleshooting startup issues
 
Windows 7 installation
Windows 7 installationWindows 7 installation
Windows 7 installation
 
Step by Step Window 7 Installation ! Designed By :- Ramandeep Kaur
Step by Step Window 7 Installation ! Designed By :- Ramandeep KaurStep by Step Window 7 Installation ! Designed By :- Ramandeep Kaur
Step by Step Window 7 Installation ! Designed By :- Ramandeep Kaur
 

En vedette

En vedette (20)

Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)
 
Android as a digital signage platform
Android as a digital signage platformAndroid as a digital signage platform
Android as a digital signage platform
 
Analog block diagram
Analog block diagramAnalog block diagram
Analog block diagram
 
Android app development lesson 1
Android app development lesson 1Android app development lesson 1
Android app development lesson 1
 
07.4. Android Basic Simple Browser (WebView)
07.4. Android Basic Simple Browser (WebView)07.4. Android Basic Simple Browser (WebView)
07.4. Android Basic Simple Browser (WebView)
 
10.1. Android Audio
10.1. Android Audio10.1. Android Audio
10.1. Android Audio
 
11.1 Android with HTML
11.1 Android with HTML11.1 Android with HTML
11.1 Android with HTML
 
10.3 Android Video
10.3 Android Video10.3 Android Video
10.3 Android Video
 
07.3. Android Alert message, List, Dropdown, and Auto Complete
07.3. Android Alert message, List, Dropdown, and Auto Complete07.3. Android Alert message, List, Dropdown, and Auto Complete
07.3. Android Alert message, List, Dropdown, and Auto Complete
 
04. Review OOP with Java
04. Review OOP with Java04. Review OOP with Java
04. Review OOP with Java
 
06. Android Basic Widget and Container
06. Android Basic Widget and Container06. Android Basic Widget and Container
06. Android Basic Widget and Container
 
08.1. Android How to Use Intent (explicit)
08.1. Android How to Use Intent (explicit)08.1. Android How to Use Intent (explicit)
08.1. Android How to Use Intent (explicit)
 
Using intents in android
Using intents in androidUsing intents in android
Using intents in android
 
Java Programming - Polymorphism
Java Programming - PolymorphismJava Programming - Polymorphism
Java Programming - Polymorphism
 
Objected-Oriented Programming with Java
Objected-Oriented Programming with JavaObjected-Oriented Programming with Java
Objected-Oriented Programming with Java
 
07.1. Android Even Handling
07.1. Android Even Handling07.1. Android Even Handling
07.1. Android Even Handling
 
Java Programming - Introduction to Abstract Class
Java Programming - Introduction to Abstract ClassJava Programming - Introduction to Abstract Class
Java Programming - Introduction to Abstract Class
 
Java Programming - Inheritance
Java Programming - InheritanceJava Programming - Inheritance
Java Programming - Inheritance
 
12. Android Basic Google Map
12. Android Basic Google Map12. Android Basic Google Map
12. Android Basic Google Map
 
Database Concept - ERD Mapping to MS Access
Database Concept - ERD Mapping to MS AccessDatabase Concept - ERD Mapping to MS Access
Database Concept - ERD Mapping to MS Access
 

Similaire à 10.2 Android Audio with SD Card

Huawei media pad sd card upgrade user guide
Huawei media pad sd card upgrade user guideHuawei media pad sd card upgrade user guide
Huawei media pad sd card upgrade user guide
victor blas estrada
 
Samsung ssd data_migration_user_manual_eng_v.3.1
Samsung ssd data_migration_user_manual_eng_v.3.1Samsung ssd data_migration_user_manual_eng_v.3.1
Samsung ssd data_migration_user_manual_eng_v.3.1
cchan14
 
Android installation
Android installationAndroid installation
Android installation
Durai S
 
Android chapter02-setup1-sdk
Android chapter02-setup1-sdkAndroid chapter02-setup1-sdk
Android chapter02-setup1-sdk
Tran Le Hoan
 

Similaire à 10.2 Android Audio with SD Card (20)

02.1 - Getting Started with Android
02.1 - Getting Started with Android02.1 - Getting Started with Android
02.1 - Getting Started with Android
 
Huawei media pad sd card upgrade user guide
Huawei media pad sd card upgrade user guideHuawei media pad sd card upgrade user guide
Huawei media pad sd card upgrade user guide
 
Backing Up Android
Backing Up AndroidBacking Up Android
Backing Up Android
 
Laptop Dell Inspiron 3576 giá rẻ thiết kế bền bỉ
Laptop Dell Inspiron 3576 giá rẻ thiết kế bền bỉLaptop Dell Inspiron 3576 giá rẻ thiết kế bền bỉ
Laptop Dell Inspiron 3576 giá rẻ thiết kế bền bỉ
 
Samsung ssd data_migration_user_manual_eng_v.3.1
Samsung ssd data_migration_user_manual_eng_v.3.1Samsung ssd data_migration_user_manual_eng_v.3.1
Samsung ssd data_migration_user_manual_eng_v.3.1
 
sims
simssims
sims
 
Client FAQs regarding cd and dvds
Client FAQs regarding cd and dvdsClient FAQs regarding cd and dvds
Client FAQs regarding cd and dvds
 
Dell Venue 7 3740
Dell Venue 7 3740Dell Venue 7 3740
Dell Venue 7 3740
 
Android in ubuntu
Android in ubuntuAndroid in ubuntu
Android in ubuntu
 
Android installation
Android installationAndroid installation
Android installation
 
Arduino : how to get started
Arduino : how to get startedArduino : how to get started
Arduino : how to get started
 
Android chapter02-setup1-sdk
Android chapter02-setup1-sdkAndroid chapter02-setup1-sdk
Android chapter02-setup1-sdk
 
Cd rom on solaris
Cd rom  on solarisCd rom  on solaris
Cd rom on solaris
 
A826 Quick Start Guide
A826 Quick Start GuideA826 Quick Start Guide
A826 Quick Start Guide
 
Virtual dj 7 getting started
Virtual dj 7   getting startedVirtual dj 7   getting started
Virtual dj 7 getting started
 
Android tools for testers
Android tools for testersAndroid tools for testers
Android tools for testers
 
Ds708 upgrade instructions
Ds708 upgrade instructionsDs708 upgrade instructions
Ds708 upgrade instructions
 
CD/DVD Drive Error Cause Detection and Solution
CD/DVD Drive Error Cause Detection and SolutionCD/DVD Drive Error Cause Detection and Solution
CD/DVD Drive Error Cause Detection and Solution
 
Mobile App Security Testing
Mobile App Security TestingMobile App Security Testing
Mobile App Security Testing
 
Audacity
AudacityAudacity
Audacity
 

Plus de Oum Saokosal (7)

Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
 
Java Programming - Abstract Class and Interface
Java Programming - Abstract Class and InterfaceJava Programming - Abstract Class and Interface
Java Programming - Abstract Class and Interface
 
09.1. Android - Local Database (Sqlite)
09.1. Android - Local Database (Sqlite)09.1. Android - Local Database (Sqlite)
09.1. Android - Local Database (Sqlite)
 
More on Application Structure
More on Application StructureMore on Application Structure
More on Application Structure
 
Basic Understanding of Android XML
Basic Understanding of Android XMLBasic Understanding of Android XML
Basic Understanding of Android XML
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to Android
 
Android - Introduction
Android - IntroductionAndroid - Introduction
Android - Introduction
 

Dernier

Dernier (20)

Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

10.2 Android Audio with SD Card

  • 1. 10.2. Audio with SD Card Oum Saokosal Master of Engineering in Information Systems, South Korea 855-12-252-752 oum_saokosal@yahoo.com
  • 2. Upload to SD Card of the Emulator • Normally when you run the app on an Android device, you will need to play a song from the sdcard of the device. • To place the song to the sdcard, simply copy it and paste. • However, to test it on the Emulator, you need to push the file to the the Emulator. See how-to in the next slide.
  • 3. I. Create size for sdcard: 1. Go to AVD Manager (Window -> AVD Manager) 2. Click on your avd (e.g.avd.2.3.3) -> Edit 3. Enter a size: 1000 for the SD Card 4. Click Enter AVD to finish.
  • 4. II. Upload a file to SD Card: 1. Go to DDMS -> File Explorer 2. In case you can't see the file, please run the Emulator first. 3. Browse to mnt/sdcard 4. Click on the button call "Push a file onto the device" to upload.
  • 5. Play a Song from SD Card • To play an embedded song: MediaPlayer mp; mp = MediaPlayer.create(this, R.raw.song1)); • To play a song from SD Card: MediaPlayer mp; mp = MediaPlayer.create(this, Uri.parse("/sdcard/More Than I Can Say.mp3"));
  • 6. • To Play with setDataSource() method: MediaPlayer mp; mp = new MediaPlayer(); try{ mp.reset(); mp.setDataSource("/sdcard/I love you.mp3"); mp.prepare(); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalStateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } mp.start();
  • 7. Go on to the next slide