[android-developers] Re: Mp3 file read problem in Real device (G1)

2009-03-18 Thread jayesh

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 as "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

On Mar 18, 3:36 pm, Dave Sparks  wrote:
> Just in case there is any confusion, your APK is not going to contain
> the MP3 files that were loaded on the virtual SD card in the emulator.
>
> If you want to play MP3's on the device's SD card, you need to install
> them there, either by copying them from your workstation, downloading
> them from the Internet, or by creating them within your program.
>
> On Mar 17, 10:49 pm, "jayesh.thadani" 
> wrote:
>
> > 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
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Mp3 file read problem in Real device (G1)

2009-03-18 Thread Dave Sparks

Just in case there is any confusion, your APK is not going to contain
the MP3 files that were loaded on the virtual SD card in the emulator.

If you want to play MP3's on the device's SD card, you need to install
them there, either by copying them from your workstation, downloading
them from the Internet, or by creating them within your program.

On Mar 17, 10:49 pm, "jayesh.thadani" 
wrote:
> 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
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---