In my app (simple sd card files browser) i want to open file in the same way thet the standart system files browser do, calling the dialog with list of diffrent applications thet can open or execute this file. I already have file name.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no “standart system files browser” in Android.
Assuming that you know the name and MIME type of the file, you can create an
ACTION_VIEWIntent, usingsetDataAndType()to supply theUrito the file and the MIME type. Then, callstartActivity()on thatIntent. If the user has chosen a default activity to apply to this type of file, or if there is only one activity that can view the file, then the activity will start. Otherwise, the user will get a “chooser” to allow a choice from the various possible activities.