How to 'Open directory in TC' from my launcher?

Support for Android version of Total Commander

Moderators: sheep, Hacker, Stefan2, white

Post Reply
zcoke
Junior Member
Junior Member
Posts: 4
Joined: 2019-01-28, 05:49 UTC

How to 'Open directory in TC' from my launcher?

Post by *zcoke » 2019-01-28, 06:01 UTC

Hi

I'm making some changes to my Kodi interface and I'm adding some shortcuts. I now want to add a shortcut to a specific folder (/Shared/new) so I need these few lines of code for opening folder in TC. I have no experience in programming but for now I'm doing well. This is an example for my Kodi favorites item that simply opens Total Commander app:

<favourite name="Total Commander">
StartAndroidActivity("com.ghisler.android.TotalCommander")
</favourite>



Now I need the same for opening a specific dir in TC (which I would put instead of these line in italics).

I would be very thankful if someone could provide me these few lines of code.

Greetings

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 37667
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How to 'Open directory in TC' from my launcher?

Post by *ghisler(Author) » 2019-01-28, 14:21 UTC

Does Kodi somehow allow to pass URLs to opened apps? If yes, try sending e.g.
file:///storage/emulated/0
or
content:///storage/emulated/0
Author of Total Commander
http://www.ghisler.com

zcoke
Junior Member
Junior Member
Posts: 4
Joined: 2019-01-28, 05:49 UTC

Re: How to 'Open directory in TC' from my launcher?

Post by *zcoke » 2019-01-28, 16:57 UTC

Yes, it does. However, the question is what is the right action for opening a dir. I'm pretty sure ACTION_VIEW is not for opening folders, so I need to know the right action. Does Kodi allows to pass URLs to opened apps, it does, yes.

zcoke
Junior Member
Junior Member
Posts: 4
Joined: 2019-01-28, 05:49 UTC

Re: How to 'Open directory in TC' from my launcher?

Post by *zcoke » 2019-01-28, 16:59 UTC

For example, this would work in Kodi:

Code: Select all

StartAndroidActivity(com.android.chrome,android.intent.action.VIEW,,http://kodi.tv/)
That would open a web page url in Chrome.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 37667
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How to 'Open directory in TC' from my launcher?

Post by *ghisler(Author) » 2019-01-29, 15:44 UTC

MAIN should work, that's the one used by the launcher for the main form:
StartAndroidActivity(com.ghisler.android.TotalCommander,android.intent.action.MAIN,,content:///storage/emulated/0)
Author of Total Commander
http://www.ghisler.com

Post Reply