Software Archive
Read-only legacy content
17061 Discussões

Music player on android emulator

Kishor_D_
Novo colaborador I
6.365 Visualizações
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 Solução
ramindore
Principiante
6.365 Visualizações
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

Ver solução na publicação original

11 Respostas
natejacobs
Principiante
6.365 Visualizações
You can download Android Emulatoe for mobile or PC.You can download below link...

http://www.addictivetips.com/windows-tips/download-google-android-emulator/
ramindore
Principiante
6.366 Visualizações
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
imed
Principiante
6.365 Visualizações
Mohamed_Khalil_ZENDA
Principiante
6.364 Visualizações

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

Ahmed_BH
Principiante
6.364 Visualizações

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

Hyrulia
Principiante
6.365 Visualizações

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

Mohamed_helmi_b_
Principiante
6.365 Visualizações

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

Ashwin_S_Ashok
Principiante
6.365 Visualizações

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

main menu->devtools->mediascanner

Ashwin_S_Ashok
Principiante
6.365 Visualizações

check the file path in program code...

JLuna5
Novo colaborador I
6.365 Visualizações

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

Responder