Music player on android emulator

Music player on android emulator

imagem 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 new
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.
imagem 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/

imagem 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
imagem de imed
Esprit Mobile
imagem de Ahmed BH
imagem 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 ;)

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

imagem de Hyrulia

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

DEMACIAAAAA!
imagem de Mohamed helmi b.

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

Faça login para deixar um comentário.