如何在安卓应用程序中显示特定频道的所有YouTube视频.I m使用安卓studio开发安卓App...and频道的新视频在安卓应用程序中自动显示...请帮帮我
发布于 2017-06-28 20:22:19
String youtubeURL = "https://www.youtube.com/user/androiddevelopers";
Intent youtubeIntent=null;
try {
youtubeIntent=new Intent(Intent.ACTION_VIEW);
youtubeIntent.setPackage("com.google.android.youtube");
youtubeIntent.setData(Uri.parse(youtubeURL ));
startActivity(youtubeIntent);
} catch (ActivityNotFoundException e) { // If youtube app not available then using browser it should open
youtubeIntent= new Intent(Intent.ACTION_VIEW);
youtubeIntent.setData(Uri.parse(youtubeURL ));
startActivity(youtubeIntent);
}
https://stackoverflow.com/questions/44801321
复制相似问题