Choose folder on Android device

自古美人都是妖i 提交于 2019-12-30 04:01:17

问题


I would like to let user pick directory and save downloaded file (my app downloads file). I know that some tools (for example, ES File Explorer) provide such intent-filters. see http://www.estrongs.com/en/support/developers.html. I start activity for result and then get selected folder as a result.

Also, I know that there are no "select folder" intent standards (I can't use the same intent with other tools). Do you know other tools to support such functionality ? I would like to let user use his tool, not ES File Manager.

Also, does Astro provide such intent filters? I can't find this info on their page. (I think astro is the most used file manager for android)


回答1:


I've recently come across something that might potentially help here: http://www.openintents.org/en/node/159

It has a demo application showing how it can interact with third party applications as a file/directory picker.

That said, I have not tried it yet. I stumbled across this question as I am still looking for other options.

Edit: actually, it looks very similar to your ES File Manager link. Perhaps it is merely a clone.




回答2:


Here is complete Android library: https://github.com/lemberg/directory-selector-dialog-preference

It can be used either as DialogFragment or as DialogPreference. I am it's author so don't hesitate to ask any questions.



来源:https://stackoverflow.com/questions/4793001/choose-folder-on-android-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!