1

I Am a newbie to Android and Stuck with a particular task. I have an application and it is intended to play videos and I have to play second video while playing first video and after completion of the second video I have to return to the first video at the same position it is stopped.

I have been successful in playing second video also but when that video is finished I can't go back to the first video at the stopped position.

can anyone please tell me how to do that?

Thank you in Advance....

KRS
  • 25
  • 9
  • You could save the last position length/duration of the video in a SharedPreference or similar... return and start again but from that position. – Mariano Zorrilla Dec 03 '15 at 13:13

1 Answers1

0

You can do one thing is that, save the instance of acivity at that when you are opning new activity and with that activity save the time upto which video has been played using getCurrentPosition() and when returning to activity, resume saved instance and get timing and use function seekTo(position) on onResume() method.

for further information you can view Video View Resume

Community
  • 1
  • 1
androgo
  • 564
  • 2
  • 8