SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt? (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
 

Andere mochten auch

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Kürzlich hochgeladen

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Kürzlich hochgeladen (20)

INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
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.
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
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
 

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