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

2013-02-20 Thread Brill Pappin
I'm actually using a dynamically generated path based on what the OS says is the user's partition, so it's unlikely that the path is incorrect. What i discovered is that the MediaPlayer refuses to play a file in a custom directory under the apps external directory, but will play it if I put it in

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

2013-02-20 Thread Jeff Sharkey
Starting in Android 4.2, processes may have different views of the filesystem depending on which user they're running as. For example, "/sdcard/foo.mp3" could refer to different files for different users. To correctly disambiguate filesystem paths, you'll need to open the file in your app process

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

2013-02-19 Thread Brill Pappin
I can try that. I should have some time away from the crunch later in the month :) To really reproduce exactly what I was doing, I'll need to be able to download an mp3 to the external memory, but I assume that a test could be set up even if the file is no longer there. - Brill On Tuesday, Fe

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

2013-02-19 Thread Mark Murphy
If you can create a sample project that reproduces the error, post it and your description as an issue on http://b.android.com. If you think of it, reply on this thread with the issue link. On Tue, Feb 19, 2013 at 5:18 PM, Brill Pappin wrote: > So, for all of you paying attention to this thread o

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

2013-02-19 Thread Brill Pappin
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.getExterna

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

2013-02-15 Thread Brill Pappin
So I've now tested many different ways to try and figure this out and I need to reset the code (as I've introduced some silly errors). That error is most definitely a path problem which I need to retest and make sure I didn't introduce with my own hacking :) I *do* know that what was working in

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

2013-02-15 Thread Brill Pappin
Its pretty basic. and works fine up until 4.2.1 (e.g. its working in 4.1.1). On Friday, February 15, 2013 11:17:39 AM UTC-5, Mahabaleshwara Adiga wrote: > > Hi, > > Can you check your audio codec formats ? Some of the mp3 audio codecs will > be differed.. So by default Media palyer could not

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

2013-02-15 Thread Brill Pappin
Yes its readable. On Friday, February 15, 2013 11:14:34 AM UTC-5, Nobu Games wrote: > > The Stackoverflow thread mentions file permission problems. Is that file > world readable? > > On Friday, February 15, 2013 10:03:35 AM UTC-6, Brill Pappin wrote: >> >> More tests indicate that MediaPlayer can

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

2013-02-15 Thread Mahabaleshwara Adiga
Hi, Can you check your audio codec formats ? Some of the mp3 audio codecs will be differed.. So by default Media palyer could not play the some mp3 audio codecs. If you want to see different audio codecs, go to 'Mediaplayer codecs in android'. Use proper audio codecs and play smoothly.. On Fri

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

2013-02-15 Thread Nobu Games
The Stackoverflow thread mentions file permission problems. Is that file world readable? On Friday, February 15, 2013 10:03:35 AM UTC-6, Brill Pappin wrote: > > More tests indicate that MediaPlayer can't open the file, even thought the > file existence and location has been verified, both manual

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

2013-02-15 Thread Brill Pappin
More tests indicate that MediaPlayer can't open the file, even thought the file existence and location has been verified, both manually and in code. The key is from a Nexus 10 running Android 4.2.1 which outputs: 02-15 11:00:40.101: E/(127): Failed to open file '/file:/storage/emulated/0/Android/

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

2013-02-15 Thread Brill Pappin
More clues: So it looks like the media player can't open the file. The file URL looks borked as well. I know the file exists and (I can see it in code and in DDMS). Here is the trace for it. Note that I'm not *positive* that the path its outputting is borked internally or just logging it, but a

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

2013-02-15 Thread Brill Pappin
I have now verified this same error pops up on a Nexus 10 as well... so now we've got it happening on all three (Nexus 4, 7, 10), which is a pretty good indication that it's a problem in the MediaPlayer in Android 4.2.x. This really needs the attention of a google engineer. Apparently I'm not th

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

2013-02-15 Thread Brill Pappin
Hi Bob, This is all being run on real hardware (I never use the emulator for anything). On Thursday, February 14, 2013 3:46:37 PM UTC-5, bob wrote: > > Have you tried it on a real device or just the emulator? > > > > On Thursday, February 14, 2013 11:38:22 AM UTC-6, Brill Pappin wrote: >> >> I'

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

2013-02-14 Thread Alex Lockwood
The "emulated" directory you see in the pathname doesn't mean he is using the emulator. This directory structure was modified in API 17 due to the addition of multiuser support. I'm having the same problem... trying to figure it out now. On Thursday, February 14, 2013 3:46:37 PM UTC-5, bob wrot

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

2013-02-14 Thread bob
Have you tried it on a real device or just the emulator? On Thursday, February 14, 2013 11:38:22 AM UTC-6, Brill Pappin wrote: > > I've been working on an app that plays MP3 files and have started with out > with the lowest supported android version and working upward toward JB. > > For some