Accessing MP3 from Memory card of G1 device

All your problems with Audio, Video and Images.

Accessing MP3 from Memory card of G1 device

Postby jayesh.thadani » Wed Mar 18, 2009 6:52 am

Hello friends,

I have demo music player which reads mp3 files from virtual memory card of emulator

I pass path something like this "/sdcard" and its working fine, at a time of reading MP3 from virtual memory card of emulator.

But when this .apk is installed on real device G1, application is not been able to find any MP3 files from memory card of G1 device,

Can any one suggest for this issue on real device G1, or can provide a code on how to read files from Memory card of G1.

Thanks,
Jayesh
jayesh.thadani
Junior Developer
Junior Developer
 
Posts: 18
Joined: Tue Jan 13, 2009 2:50 pm
Location: India

Top

Postby jayesh.thadani » Thu Mar 19, 2009 6:13 am

Hello andrioders,

After working for few hours, i over come problem of not getting mp3 file from SDCARD of G1 device.

instead of passing Path as static String as /sdcard, i pass android.os.Environment.getExternalStorageDirectory().getPath();

above line will give a "/sdcard", but make sure that ur Sdcard has same path, with no directories in it,

At present my Sdcard has "Music" Folder, that the real cause of problem, it was not been able to find a mp3 file in root directory of /sdcard,

Hence in end i pass android.os.Environment.getExternalStorageDirectory().getPath() + File.seperator + "Music";

And now it is working..


Keep d Spirit Up,
Jayesh
jayesh.thadani
Junior Developer
Junior Developer
 
Posts: 18
Joined: Tue Jan 13, 2009 2:50 pm
Location: India

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 29 guests