android - Select File from file manager via Intent -
what wanna do:
i wanna path string of file, choose via android file manager.
what have:
intent intent = new intent(intent.action_get_content); intent.settype("*/*"); startactivityforresult(intent.createchooser(intent, "open ..."), file_select_code);
this code, works fine me, there 1 problem. can select file following apps:
my question:
does have working code choosing file via android file manager?
use this:
intent intent = new intent(intent.action_open_document); intent.addcategory(intent.category_openable); intent.settype("*/*"); startactivityforresult(intent, request_code);
for samsung devices open file manager use this:
intent intent = new intent("com.sec.android.app.myfiles.pick_data"); intent.putextra("content_type", "*/*"); intent.addcategory(intent.category_default);
for more reference checkout http://developer.android.com/guide/topics/providers/document-provider.html
Comments
Post a Comment