+ List<ResolveInfo> launchables = mFileActivity.getPackageManager().
+ queryIntentActivities(openFileWithIntent, PackageManager.GET_INTENT_FILTERS);
+
+ if(launchables != null && launchables.size() > 0) {
+ try {
+ mFileActivity.startActivity(
+ Intent.createChooser(
+ openFileWithIntent, mFileActivity.getString(R.string.actionbar_open_with)
+ )
+ );
+ } catch (ActivityNotFoundException anfe) {
+ showNoAppForFileTypeToast(mFileActivity.getApplicationContext());
+ }
+ } else {
+ showNoAppForFileTypeToast(mFileActivity.getApplicationContext());
+ }