I\'m working on an Android application which should be able to open a selected file from a specific folder.
I already tried this, but after selecting which applicati
directly you can use this code it will open all type of files
Intent sharingIntent = new Intent(Intent.ACTION_VIEW);
Uri screenshotUri = Uri.fromFile(your_file);
sharingIntent.setType("image/png");
sharingIntent.putExtra(Intent.EXTRA_STREAM, screenshotUri);
String type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(MimeTypeMap.getFileExtensionFromUrl(screenshotUri.toString()));
sharingIntent.setDataAndType(screenshotUri, type == null ? "text/plain" : type);
startActivity(Intent.createChooser(sharingIntent, "Share using"));