判断隐式Intent是否有响应
PackageManager manager = getContext().getPackageManager(); if (manager.queryIntentActivities(intent, 0).size() > 0) { startActivity(intent); }
// Verify that the intent will resolve to an activity if (sendIntent.resolveActivity(getPackageManager()) != null) { startActivity(sendIntent); }