Android Intent Create intentAvailable(Context context, Intent intent)

Here you can find the source of intentAvailable(Context context, Intent intent)

Description

checks if a given intent can be called on the system

Parameter

Parameter Description
context a parameter
intent a parameter

Declaration

public static boolean intentAvailable(Context context, Intent intent) 

Method Source Code

//package com.java2s;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;

public class Main {
    /**/*w  w  w.java2 s. c o  m*/
     * checks if a given intent can be called on the system
     * 
     * @param context
     * @param intent
     * @return
     */
    public static boolean intentAvailable(Context context, Intent intent) {
        return context
                .getPackageManager()
                .queryIntentActivities(intent,
                        PackageManager.MATCH_DEFAULT_ONLY).size() > 0;
    }
}

Related

  1. sendUpdateCallerInfoCacheIntent(Context context)
  2. getGalleryIntent()
  3. getCutPicIntent(Uri uri, int outputX, int outputY)
  4. getSysAppDetailIntent(Context context)
  5. getSysAppSearchIntent(String key)
  6. intentFromByteArray(byte[] byteArray)
  7. newXdiPlayIntent()
  8. shareImages(Activity activity, String imagePath)
  9. pickNcapture(Activity activity, Uri outputFileUri)