Reputation: 4984
In my application I want to upload file from SD card to my server. For that i want open the file chooser dialogue with all files contains in SD card.Please any one help me how to do that I tried something
Intent intent = new Intent();
// intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent,"Select Picture"), SELECT_PICTURE);
It open only the image files but i want all the files
Upvotes: 2
Views: 10552
Reputation: 109257
Actually Android doesn't have inbuilt File Explorer support. So for this you have to either use of any third party File Explorer like Astro , ES, etc and using Intent you can get the file which you want in your application.
Also the way you tried is only for specific image from gallery. So it doesn't help you in other file format.
But I recommended you to just go through Android-File-Explorer a GitHub project and use it, its a just one file you have to include your project and its work as a File Explorer and you don't have to use any third party application for this.
Upvotes: 8