Open Directory
android.intent.action.OPEN_DOCUMENT_TREE
Allows the user to select and return a document directory.
Read also the Android documentationUse
public void startOpenDirectory(android.net.Uri initialUri) { Intent intent = new Intent("android.intent.action.OPEN_DOCUMENT_TREE"); intent.putExtra("android.provider.extra.INITIAL_URI", initialUri); // android.net.Uri if (intent.resolveActivity(getPackageManager()) != null) { startActivityForResult(intent, REQUEST_CODE); } } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_CODE && resultCode == RESULT_OK) { // handle result } }
Example intent filter
<activity ...> <intent-filter> <action android:name="android.intent.action.OPEN_DOCUMENT_TREE" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity>
Apps Providing an Implementation
Search on Google Play, AppBrain, Amazon App store or similar (not yet available - please make this happen!)