[android-developers] Re: Confusing Problem about MediaPlayer

2008-04-14 Thread Robert
Hi Megha, It makes sense to start playing only in onPrepared(), but this doesn't help much. I also tried various other combinations to make this work, but can't seem to nail down the right one. Only on rare occasions the mp4 files recorded with MediaRecorder actually play under my conditions (re

[android-developers] Re: Confusing Problem about MediaPlayer

2008-04-14 Thread Megha Joshi
Hi, About the MediaPlayer, I think the issue is that along with waiting for the surface being created, the start() method should be called when the MediaPlayer is prepared... I tried moving the code around and it works the way you wanted it to: public void surfaceCreated(SurfaceHolder holder) {

[android-developers] Re: Confusing Problem about MediaPlayer

2008-04-12 Thread Robert
Unfortunately setting mSF to null had no influence. Some additional info on what's happening: If I leave in my main.xml, the surface won't show the video, but will contain the info what was displayed on it in the subactivity. If I use in main.xml, the subactivity info is erased, but the surfac

[android-developers] Re: Confusing Problem about MediaPlayer

2008-04-11 Thread Megha Joshi
Hi Robert, What if you set mSF to null in surfaceDestroyed() call... Does that help? Thanks, Megha On Fri, Apr 11, 2008 at 2:27 PM, Robert <[EMAIL PROTECTED]> wrote: > > > Hi Megha, > > I am successfully using your classes to capture and view video files. > But, can't seem to reliable reuse

[android-developers] Re: Confusing Problem about MediaPlayer

2008-04-11 Thread Robert
Hi Megha, I am successfully using your classes to capture and view video files. But, can't seem to reliable reuse the same surface when returning from a subactivity. I tried playing a video file in onActivityResult(), and although managed to play it on rare occasions, most of the time the video

[android-developers] Re: Confusing Problem about MediaPlayer

2008-04-08 Thread fubin
Thank you Megha! I get it! But I have another question about the onSurfaceCreate() callback. When will it be invoked? if I set the surfaceview's visibility from VISIBLE to GONE, then I set it from GONE to VISIBLE, will the onSurfaceCreate() callback be invoked again? Can you give a sample pause a

[android-developers] Re: Confusing Problem about MediaPlayer

2008-04-07 Thread Megha Joshi
Hi, This is because the surface is not yet ready for the mediaplayer, please call the mediaPlayer initialization code in or after OnSurfaceCreate() callback.. Thanks, Megha On Mon, Apr 7, 2008 at 9:45 AM, fubin <[EMAIL PROTECTED]> wrote: > > In Sample given by google There is a button to invoke