在 Android 上使用 Intent 打开视频链接的问题

Intent intent = new Intent(Intent.ACTION_VIEW);    intent.setDataAndType(Uri.parse("http://www.yourvideo.mp4"), "video/mp4");    view.getContext().startActivity(intent); 

检测 Android 中的某个 Intent 是否有效
public static boolean isIntentAvailable(Context context, String action) {      final PackageManager packageManager = context.getPackageManager();      final Intent intent = new Intent(action);      List<ResolveInfo> list =              packageManager.queryIntentActivities(intent,                     PackageManager.MATCH_DEFAULT_ONLY);      return list.size() > 0;   } 

更多相关文章

  1. Android(安卓)SDK更新失败及其解决办法
  2. Android(安卓)HttpURLConnection网络通信
  3. android 录像/打开video文件
  4. 完美解决android Studio打开报错 https://code.google.com/p/and
  5. Android(安卓)SDK Manager无法自动更新
  6. 安装android的sdk
  7. Android Studio设置HTTP代理
  8. android 环境搭建
  9. Android软键盘显示模式及打开和关闭方式

随机推荐

  1. Android初级教程获取手机位置信息GPS与动
  2. Android之Intent显示和隐式调用
  3. Android自动化工具Monkeyrunner使用(二)
  4. Android(安卓)UI中的自定义style和theme
  5. 如何在Linux平台下安装JDK
  6. onStartCommand 的返回值
  7. Android中cursor.getInt()返回值的坑
  8. Android待机状态更新
  9. Android(安卓)通过系统使用NotificationL
  10. Android(安卓)opencore编译问题总结