junker37 wrote: > 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?
No, it is implemented. Search Google Code Search for: package:android videoview and you will see the implementation. Most likely, by the time onPause() is called, the underlying MediaPlayer instance is stopped. The two differences in my case: 1. I'm using MediaPlayer directly, rather than VideoView, so I get finer-grained control over matters. You can see a sample video player using MediaPlayer over here: https://github.com/commonsguy/vidtry/tree 2. I am simply using postDelayed() to get control once a second and am updating a visual elapsed-time counter at that point based on getCurrentPosition() (note: this is in a separate project than the vidtry app I link to above). You could do the same thing, caching the last-known position for use when onPause() is called. You might be a second off, but I would hope that users would be amenable to that. -- 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 [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 -~----------~----~----~----~------~----~------~--~---

