The obvious solution seems to be: instead of letting it play after
onPause(), save your position in the file (MediaPlayer has a
getCurrentPosition method), and pick up from there after you recreate
the SurfaceHolder in onResume(). I don't think the user wants it to
continue playing after onPause() anyway, audio or audio+video.

Or did you try this and were unable to get it to work?

On Sep 17, 6:32 am, abhay mulye <[email protected]> wrote:
> Hi all,  i am developing the application which displays Video on the
> SurfaceHolder.
> When i run my video it plays well. But if i switch my application using
> "Home key", & go to some other application.
> Now if i come back by long Home key press to my application, my video does
> not get displayed but audio continues.
>
> This happens because, onPause() is called for Activity when Application is
> switched. Thus the "SurfaceHolder" is destroyed, & next time no video is
> displayed.
>
> Anybody having a solution for this. Is this a common issue? .
>
> Regards,
> Abhay

-- 
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to