Music player on android emulator

Music player on android emulator

Portrait de kishordesai

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

9 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de natejacobs

You can download Android Emulatoe for mobile or PC.You can download below link...

http://www.addictivetips.com/windows-tips/download-google-android-emulator/

Portrait de ramindore

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
Portrait de imed
Esprit Mobile
Portrait de Ahmed BH
Portrait de Mohamed Khalil ZENDAH

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 ;)

Portrait de Ahmed BH

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 :)

Portrait de Hyrulia

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

DEMACIAAAAA!
Portrait de Mohamed helmi b.

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

Connectez-vous pour laisser un commentaire.