Page 1 of 1

PICK_FILE startdir does not work

Posted: 2011-08-09, 07:53 UTC
by t_arn
I use following code to pick a file:

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);
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

Posted: 2011-08-11, 12:33 UTC
by ghisler(Author)
Indeed TC isn't currently use any start path in this intent. I will add it to the next beta.

Posted: 2011-08-21, 07:36 UTC
by t_arn
Thank you for adding this feature.
It works fine!

Tom