I took a look at the activity lfiecycle again and it seems onPause
would be the only place I could get the current position before the
activity is paused.

The video has definitely not finished playing before onPause has been
called.  Is it possible that videoView.getCurrentPosition has not been
implemented yet?

On Jul 24, 7:52 am, junker37 <junke...@gmail.com> wrote:
> I call getCurrentPosition on the onPause method of my activity.  So,
> what you're saying is maybe before onPause is called, the video has
> been stopped already?  That makes sense.  I'll look at th activity
> lifecycle again and see if there is another method I should use to
> pause the video.
>
> On Jul 24, 5:44 am, Mark Murphy <mmur...@commonsware.com> wrote:
>
>
>
> > junker37 wrote:
> > > I'm thinking that the buffer must be lost
> > > somewhere, so I now try to capture the current position via
> > > videoView.getCurrentPosition(), however, this is always returning 0.
>
> > When are you calling getCurrentPosition()?
>
> > I am using getCurrentPosition() to update an elapsed-time counter in a
> > video player, and it definitely works. I use MediaPlayer rather than
> > VideoView, so it could be that this explains the difference in behavior.
> >  However, if you are calling getCurrentPosition() too late, it may be
> > the video has stopped and, therefore, is actually at position 0.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > _Android Programming Tutorials_ Version 1.0 Available!
--~--~---------~--~----~------------~-------~--~----~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to