//用于检测该意图能否可以使用
public static boolean isIntentAvailable(Context context, Intent intent) {
final PackageManager packageManager = context.getPackageManager();
List<ResolveInfo> list = packageManager.queryIntentActivities(intent,
PackageManager.GET_ACTIVITIES);
return list.size() > 0;
}