With SDK 0.9 beta, MediaPlayer plays from the application's data area,
provided that proper paths are used (the Android conventions appear
here a bit inconsistent concerning when to include the full path, and
when one must use only the filename). I use this all the time and it
works just fine, although for efficiency reasons I'd much prefer
keeping all information in memory like one can with J2ME (Java ME),
because I fear that read/write to flash on actual phones will be so
slow as to give noticeable audio hiccups that one does not get with
the emulator on a fast PC.
E.g., write using
openFileOutput("myfile.wav", Context.MODE_WORLD_READABLE |
Context.MODE_WORLD_WRITEABLE);
Play using MediaPlayer with
setDataSource("/data/data/mypackage/files/myfile.wav");
Regards
On Sep 1, 3:17 am, Steve Oldmeadow <[EMAIL PROTECTED]> wrote:
> Where are you storing the file? There is a change with the
> MediaPlayer where it can't open files in the application's data area
> for security reasons.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---