@@ -0,0 +1,1179 @@
+package com.michaldabski.utils;%0A%0Aimport java.io.File;%0Aimport java.util.List;%0A%0Aimport android.content.Context;%0Aimport android.content.Intent;%0Aimport android.content.pm.PackageManager;%0Aimport android.content.pm.ResolveInfo;%0Aimport android.graphics.drawable.Drawable;%0Aimport android.net.Uri;%0A%0Apublic class IntentUtils%0A%7B%0A%09public static List%3CResolveInfo%3E getAppsThatHandleFile(File file, Context context)%0A%09%7B%0A%09%09Intent intent = new Intent(Intent.ACTION_VIEW);%0A%09%09intent.setType(FileUtils.getFileMimeType(file));%0A%09%09intent.setData(Uri.fromFile(file));%0A%09%09return getAppsThatHandleIntent(intent, context);%0A%09%7D%0A%09%0A%09public static List%3CResolveInfo%3E getAppsThatHandleIntent(Intent intent, Context context)%0A%09%7B%0A%09%09PackageManager packageManager = context.getPackageManager();%0A%09%09return packageManager.queryIntentActivities(intent, 0);%0A%09%7D%0A%09%0A%09public static Drawable getAppIconForFile(File file, Context context)%0A%09%7B%0A%09%09List%3CResolveInfo%3E infos = getAppsThatHandleFile(file, context);%0A%09%09PackageManager packageManager = context.getPackageManager();%0A%09%09for (ResolveInfo info : infos)%0A%09%09%7B%0A%09%09%09Drawable drawable = info.loadIcon(packageManager);%0A%09%09%09if (drawable != null)%0A%09%09%09%09return drawable;%0A%09%09%7D%0A%09%09return null;%0A%09%7D%0A%7D%0A

Add IntentUtils class