You are here

Browse File/Folder (Jump To)

Action: 
android.intent.action.VIEW
Input: 
A file/folder URI to start browsing as the Data and a Type of "vnd.android.cursor.item/file"
Output: 
None

Open a file browser and display the file (or folder contents) of the File URI passed in. Also known as "Jump To..."

Sample code:
void browseFile(File aFile) {
Intent theIntent = new Intent(Intent.ACTION_VIEW);
//jump directly to the following file/folder
Uri theFileUri = Uri.fromFile(aFile);
theIntent.setDataAndType(theFileUri,"vnd.android.cursor.item/file");
theIntent.putExtra(Intent.EXTRA_TITLE,"A Custom Title"); //optional
try {
startActivity(theIntent);
} catch (Exception e) {
e.printStackTrace();
}
}

File Browsers/Managers wishing to implement this intent would use an AndroidManifest filter similar to:

Status of intents protocol: