Code example for PackageManager

Methods: queryIntentActivities

0
         * conn).setHostnameVerifier(ALLOW_ALL_HOSTNAME_VERIFIER); if 
         * (IGNORE_ERROR_SSL_FACTORY != null) { ((HttpsURLConnection) 
         * conn).setSSLSocketFactory(IGNORE_ERROR_SSL_FACTORY); } } 
         */ 
    } 
 
    /* 
     * via https://developer.android.com/training/camera/photobasics.html# 
     * TaskCaptureIntent 
     */ 
    public static boolean isIntentAvailable(Context context, String action) {
        final PackageManager packageManager = context.getPackageManager();
        final Intent intent = new Intent(action);
        List<ResolveInfo> list = packageManager.queryIntentActivities(intent,
                PackageManager.MATCH_DEFAULT_ONLY);
        return list.size() > 0;
    } 
 
    private static File getAlbumStorageDir(String albumName) {
        // TODO Auto-generated method stub 
        return new File(