0

When trying to play a Video on Android, the app is prompting the user to select the player.

In code, I am doing the following. Is it possible that I select the player so the user wont' be prompted?

String url = (String) v.getTag();
            Intent intent = new Intent(android.content.Intent.ACTION_VIEW);
            intent.setDataAndType(Uri.parse(url), "video/*");
            startActivity(intent);

Below is the image this is shown to the user: enter image description here

Edit pasted as answer

intent.setPackage("com.sec.android.app.videoplayer");

I take it back. That might cause a problem on some phones. It worked on S4. However,It might not work on others. More work needs to be done.

StuartLC
  • 104,537
  • 17
  • 209
  • 285
Sam
  • 875
  • 10
  • 22

0 Answers0