Tuesday, February 19, 2013

[android-developers] Re: MediaPlayer suddenly stopped working in Android 4.2

So, for all of you paying attention to this thread or having a similar issues with MediaPlayer.

It appears that the MediaPlayer is picky about what directly the files are stored in.

This is the change I made that suddenly caused things to start working again:

// File root = context.getExternalFilesDir("audio");
File root = new File(context.getExternalCacheDir(), "audio");
root.mkdirs();


If you are an Android OS dev reading this, this is broken!

--
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate