Created
February 10, 2012 10:44
-
-
Save sabadow/1788703 to your computer and use it in GitHub Desktop.
Check if Android Intent is available
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 if an Intent is available to use | |
* @param intent the Intent to check if is available | |
* @return true if is available, false otherwise | |
*/ | |
private boolean isIntentAvailable(Intent intent) { | |
List<ResolveInfo> list = getPackageManager().queryIntentActivities(intent, | |
PackageManager.MATCH_DEFAULT_ONLY); | |
return list.size() > 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment