Android video goal: back button?

I am working on an Android application that is playing a video using the intent:

tostart = new Intent(Intent.ACTION_VIEW);
tostart.setDataAndType(Uri.parse(movieurl), "video/*");
startActivity(tostart); 

This works great. However, when you press the back button (on the device), the video returns to the beginning of the movie. Only when pressed again returns to my application. Although the current behavior makes some sense, I would like to know if I can change it: is it possible to return immediately after spinning? Thank you PanMan.

+3
source share
1 answer

given that you cannot handle another application event, another option is to find (or create) a third-party application that plays video.

+1

Source: https://habr.com/ru/post/1718265/


All Articles