Created
November 11, 2017 15:19
-
-
Save JEuler/3f6e51e1c940a0a84f64f3c323e62f2d to your computer and use it in GitHub Desktop.
isIntentAvailable()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// check intent for run | |
public boolean isIntentAvailable(Intent intent) { | |
PackageManager packageManager = getPackageManager(); | |
List<ResolveInfo> activities = packageManager.queryIntentActivities(intent, 0); | |
return activities.size() > 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment