0

Actually, I'm Developing a Video player. then I have small Requirement for the video player i.e., whenever my video player application is launched when clicking on the fab button how to play the last played video? Please anyone can help me..

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Ashok
  • 1
  • 6

2 Answers2

0

Hai Priyank Actually How to Add the Volume Increase and Decrease options using seekbar on Swipeup(); and swipe down on onToucheventListener. I have no idea to add the above functionality if possible please tell me the process or please provide the sample Priyank.

Ashok
  • 1
  • 6
-2

Store your last played video uri or file path some where in shared preference or in database. and on click play that uri or file in your video view. like below example Ask anything if you not getting my point.

Store last Video :

    SharedPreferences pref = getApplicationContext().getSharedPreferences("MyPref",0);
    Editor editor = pref.edit();
    editor.putString("LastVideo", "path or Uri"); // Store your last video uri or file path
    editor.commit();

Get last video :

String path = pref.getString("LastVideo", null); // getting String

You will get you last uri or path into path variable.

PriyankVadariya
  • 809
  • 9
  • 14