String videoURL = "https://dood.li/d/5s8ve4y8mqpj";
Intent shareVideo = new Intent(Intent.ACTION_VIEW);
shareVideo.setDataAndType(Uri.parse(videoURL), "video/*");
shareVideo.setPackage("com.instantbits.cast.webvideo");
try {{
startActivity(shareVideo);
} catch (ActivityNotFoundException ex) {
// Open Play Store if it fails to launch the app because the package doesn't exist.
// Alternatively you could use PackageManager.getLaunchIntentForPackage() and check for null.
// You could try catch this and launch the Play Store website if it fails but this shouldn’t
// fail unless the Play Store is missing.
Intent intent = new Intent(Intent.ACTION_VIEW);
String uriString = "market://details?id=com.instantbits.cast.webvideo" ;
intent.setData(Uri.parse(uriString));
startActivity(intent);
}