Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
android how to open a specific folder via intent and show its content in a file using -'android,android-intent,folder,android-sdcard'
android how to open a specific folder via intent and show its content in a file ¬†using -'android,android-intent,folder,android-sdcard'
I thought this would be easy but as it turns out unfortunately it's not.
What I have:
I have a folder called "myFolder" on my external storage (not sd card because it's a Nexus 4, but that should not be the problem). The folder contains some *.csv files.
What I want:
I want to write a method which does the following: Show a variety of apps (file browsers) from which I can pick one (see picture). After I click on it, the selected file browser should start and show me the content of "myFolder". No more no less.
How exactly do I do that? I think I came quite close with the following code, but no matter what I do - and I'm certain that there must be something I didn't get right yet - it always opens only the main folder from the external storage.
public void openFolder()
File file = new File(Environment.getExternalStorageDirectory(),
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
Sep 7, 2015
to add a comment.
Related Hot Questions
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
To avoid this verification in future, please