PICK_FILE startdir does not work

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
t_arn
Junior Member
Junior Member
Posts: 42
Joined: 2006-12-28, 07:52 UTC

PICK_FILE startdir does not work

Post 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
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed TC isn't currently use any start path in this intent. I will add it to the next beta.
Author of Total Commander
https://www.ghisler.com
t_arn
Junior Member
Junior Member
Posts: 42
Joined: 2006-12-28, 07:52 UTC

Post by *t_arn »

Thank you for adding this feature.
It works fine!

Tom
Post Reply