Here you can find the source of isIntentAvailable(Context context, String action)
static boolean isIntentAvailable(Context context, String action)
//package com.java2s; //License from project: Open Source License import java.util.List; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; public class Main { static boolean isIntentAvailable(Context context, String action) { final PackageManager packageManager = context.getPackageManager(); final Intent intent = new Intent(action); List resolveInfo = packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); if (resolveInfo.size() > 0) { return true; }// ww w. j a v a 2 s. co m return false; } }