Created
June 10, 2014 09:56
-
-
Save Reacoder/7f020f71dc8de3881499 to your computer and use it in GitHub Desktop.
Check intent .
This file contains hidden or 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
public static boolean isAvailable(Context ctx, Intent intent) { | |
final PackageManager mgr = ctx.getPackageManager(); | |
List<ResolveInfo> list = | |
mgr.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