playing from local file system

All your problems with Audio, Video and Images.

playing from local file system

Postby payelkhandelwal » Fri Feb 20, 2009 8:12 am

Hi verybody,

Can any body give me an example of playing an audio from local system. If I play a file which is already shipped with emulator I am able to play. But when I tried to play a file from local system, it is giving error.

Where do I need to store my files and how to provide the path?
payelkhandelwal
Freshman
Freshman
 
Posts: 6
Joined: Fri Dec 19, 2008 10:14 am

Top

Postby Haibane » Wed Feb 25, 2009 9:21 am

To play a file on the emulator stored on your device you need an emulated sdcard. Check the manual how to create it and put some files on it. You cannot play files stored on the local filesystem.
User avatar
Haibane
Junior Developer
Junior Developer
 
Posts: 17
Joined: Fri Feb 13, 2009 10:05 am
Location: Klagenfurt, Austria

Postby payelkhandelwal » Wed Feb 25, 2009 9:37 am

Thanks for your reply Haibane.

How can I push a file into SD card from my program?

Please help.
payelkhandelwal
Freshman
Freshman
 
Posts: 6
Joined: Fri Dec 19, 2008 10:14 am

Postby Haibane » Wed Feb 25, 2009 9:47 am

You cannot push the file from the android program itself, use the adb push command.

Create the file like this:
mksdcard 1024M sdcard1.iso


Restart the emulator using the sdcard
emulator -sdcard <filepath>


Then go to the android sdk/tools folder and push you file to the device like this:
adb push foo.txt /sdcard/foo.txt


Sometimes you need an emulator restart again.
User avatar
Haibane
Junior Developer
Junior Developer
 
Posts: 17
Joined: Fri Feb 13, 2009 10:05 am
Location: Klagenfurt, Austria

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 6 guests