Code example for Intent

Methods: setTypequeryIntentActivities

     * @param mimeType 
     *            the MIME type of the content (may be null) 
     * @return true if there are apps which will respond to this action/type 
    public static boolean isIntentAvailable(Context context, String action, String mimeType) {
        final Intent intent = new Intent(action);
        if (mimeType != null) {
        List<ResolveInfo> list = context.getPackageManager().queryIntentActivities(intent,
        return !list.isEmpty();
     * Checks whether there are applications installed which are able to handle the given intent. 
     * @param context 
     *            the current context 
     * @param intent