安卓判断intent跳转的activity是否存在

  	Intent intent = new Intent();
  	intent.setClassName("包名", "类名");
 	List<ResolveInfo> list = getContext().getPackageManager().queryIntentActivities(intent, 0);
  	if (list.size() == 0) {
    
       
       // 说明系统中不存在这个activity
  	}

借鉴这篇文章的最后一条快速传送!嗖~

猜你喜欢

转载自blog.csdn.net/qq_39168470/article/details/107408380
今日推荐