Software Archive
Read-only legacy content
17061 Discussions

Music player on android emulator

Kishor_D_
New Contributor I
6,377 Views
I want to play music on android emulator. I have pushed mp3 file on emulator using DDMS file explorer. I started music player on emulator, but mp3 file is not detected by player. Can I play music on emulator?
Thnaks,
Kishor
0 Kudos
1 Solution
ramindore
Beginner
6,377 Views
play music in android emulator
  1. goto Window->AVD Manager-> (select AVD)->Edit (in Right panel) ->New (in Hardware) ->SD Card support ->Edit AVD
  2. Through DDMS put mp3 in a folder(if not create) in sdcard oflder of mnt folder
  3. relaunch your AVD and play mp3 file

View solution in original post

0 Kudos
11 Replies
natejacobs
Beginner
6,377 Views
You can download Android Emulatoe for mobile or PC.You can download below link...

http://www.addictivetips.com/windows-tips/download-google-android-emulator/
0 Kudos
ramindore
Beginner
6,378 Views
play music in android emulator
  1. goto Window->AVD Manager-> (select AVD)->Edit (in Right panel) ->New (in Hardware) ->SD Card support ->Edit AVD
  2. Through DDMS put mp3 in a folder(if not create) in sdcard oflder of mnt folder
  3. relaunch your AVD and play mp3 file
0 Kudos
imed
Beginner
6,377 Views
0 Kudos
Mohamed_Khalil_ZENDA
6,376 Views

Hi

You can should simply push the mp3 file into the emulator with adb, and open it directly on the emulator, and ENJOY !

Google it and your life will be more easier ;)

0 Kudos
Ahmed_BH
Beginner
6,376 Views

To play .mp3 file from sdcard of the emulator follow the steps.

  1. Copy .mp3 file from your hard drive location. e.g. d:\songs\song1.mp3
  2. Open any new eclipse project. File -> New -> Android Project.
  3. In Eclipse Click on the icon “Opens the Android SDK and AVD Manger” from the toolbar.
  4. Create New AVD, by choosing, select target greater than 1.6.
  5. Upon successful creation start the AVD.
  6. In Eclipse, Goto DDMS perspective. Window -> Open Perspective -> DDMS.
  7. In DDMS Perspective, select the device (AVD) which is currently running from the Devices Panel.
  8. On the right panel from “File Explorer”, Select SDCARD folder.
  9. On the tool bar select the button “Push a file on to the device”.
  10. Select the .mp3 file from the location.
  11. Goto Java Perspective. Window-> Open Perspective -> JAVA.
  12. Write the following Code.

String PATH_TO_FILE = “/sdcard/a.mp3″;
MediaPlayer mp1 = new MediaPlayer();
try

       {
mp1.setDataSource(PATH_TO_FILE);
mp1.prepare();
mp1.start();
}       catch (IllegalArgumentException e)      {
// TODO Auto-generated catch block
e.printStackTrace();
}      catch (IllegalStateException e)      {
// TODO Auto-generated catch block
e.printStackTrace();
}      catch (IOException e)      {
// TODO Auto-generated catch block
e.printStackTrace();
}

That's all :)

0 Kudos
Hyrulia
Beginner
6,377 Views

You should try another player , but i dont think android emulator was meant to play music with.

0 Kudos
Mohamed_helmi_b_
Beginner
6,377 Views

You can simply push the mp3 file into the emulator with adb, and open it directly on the emulator

0 Kudos
Ashwin_S_Ashok
Beginner
6,377 Views

have u run the media scanner...in devtools...?

main menu->devtools->mediascanner

0 Kudos
Ashwin_S_Ashok
Beginner
6,377 Views

check the file path in program code...

0 Kudos
JLuna5
New Contributor I
6,377 Views

Hi, you would to use vwware or virtualbox for emulate android.

0 Kudos
Reply