I have an application in which the user can search for images, audio, video, a doc file with SDCard and select 1 file to upload to the server. Using the code below, I can open the gallery and select an image, audio, video. But I do not know how to search for a document from the gallery.
Here is my code.
Intent intent = new Intent();
intent.setAction(Intent.ACTION_GET_CONTENT);
//intent.setType("video/*");
//intent.setType("audio/*");
//intent.setType("image/*");
//**What I have to do for view document[.pdf/text/doc] file**
startActivityForResult(Intent.createChooser(intent, "Complete action using"), REQUEST_CODE);
Does anyone know how this can be achieved? Any help is appreciated.
Nik88 source
share