I am working on file manager application.
I want to launch particular application when user clicks on particular file from the list..
I tried it using Intents
i.setAction(Intent.ACTION_VIEW);
i.setData(Uri.fromFile(f));
i.setType("image/jpg");
startActivity(i);
I tried this program but it is giving some problems.
After clicking on a file it is showing list of possible applications than can handle this file like for image it is showing gallery,astro image viewer etc
but after selecting gallery it is giving exception for gallery application and not handling the file.
what additional things need to be done..?
I want to launch particular application when user clicks on particular file from the list..
I tried it using Intents
i.setAction(Intent.ACTION_VIEW);
i.setData(Uri.fromFile(f));
i.setType("image/jpg");
startActivity(i);
I tried this program but it is giving some problems.
After clicking on a file it is showing list of possible applications than can handle this file like for image it is showing gallery,astro image viewer etc
but after selecting gallery it is giving exception for gallery application and not handling the file.
what additional things need to be done..?