PICK_FILE startdir does not work
Posted: 2011-08-09, 07:53 UTC
I use following code to pick a file:
This works file when stLastFile (and then also startDir) is "/sdcard/".
But if stLastFile is for example "/sdcard/Daten/test.txt" (and startDir "/sdcard/Daten/") the TC filebrowser shows the dir "/" instead.
Tom
Code: Select all
String startDir = stLastFile.substring(0,stLastFile.lastIndexOf('/'))+'/';
Intent intent = new Intent ("org.openintents.action.PICK_FILE");
intent.setData(Uri.parse("file://"+startDir));
startActivityForResult(intent, requestCode);
But if stLastFile is for example "/sdcard/Daten/test.txt" (and startDir "/sdcard/Daten/") the TC filebrowser shows the dir "/" instead.
Tom