开发者

ACTION_VIEW intent result

If I want to open file, passing it's URI in an intent and ACTION_VIEW, but I don't know if there is 开发者_JAVA技巧app that supports such file, can I know whether file was opened or not?


public static boolean canIntentBeHandled(final Context ctx, final Intent intent) {
  final List<ResolveInfo> info = ctx.getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
  return info.size() > 0;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜