How to use TC4A with 'Tasker' ?

Support for Android version of Total Commander

Moderators: Hacker, Stefan2, white

Post Reply
Hurdet
Power Member
Power Member
Posts: 590
Joined: 2003-05-10, 18:02 UTC

How to use TC4A with 'Tasker' ?

Post by *Hurdet »

Do it have a intent list to use with tasker?
do it is possible to select a file with tc browse and return in tasker variable?
Do it is possible to send a intent to tasker from tc?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 43436
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The file picker/open/save dialog supports a few standard intents:
android.intent.action.SEND
android.intent.action.SEND_MULTIPLE
android.intent.action.CREATE_SHORTCUT
android.intent.action.RINGTONE_PICKER
android.intent.action.GET_CONTENT
org.openintents.action.PICK_FILE
org.openintents.action.PICK_DIRECTORY
android.intent.action.PICK
org.openintents.action.PICK_FILE

Either just send the intent without target application to get a dialog from any app, or use:
Activity: com.ghisler.android.TotalCommander.DirBrowseActivity
App: com.ghisler.android.TotalCommander

To open a directory in Total Commander, open the following activity:
com.ghisler.android.TotalCommander.TotalCommander
You can pass the directory via URL as file:// url, or as String extra with name
"ghisler_fileName" for active panel, and
"ghisler_fileName2" for inactive panel (optional).
The file:// portion can also be replaced with content:// to avoid crash with API 24.
Author of Total Commander
https://www.ghisler.com
Hurdet
Power Member
Power Member
Posts: 590
Joined: 2003-05-10, 18:02 UTC

Post by *Hurdet »

I'm able to get dialog but not get the filename picked.
Do it is possible to get filename in takser?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 43436
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It doesn't seem to be possible with Tasker. There is an action to send an intent: System -> Send intent.

However, there seems to be no option to receive the reply. To do this in code, you would use startActivityForResult instead of startActivity. This would then execute the intent, and once it's done, the program would receive an onActivityResult callback with the data in another intent.

According to the following Google Groups message, you could do it with a Tasker plugin named IntentTask:
https://groups.google.com/forum/#!topic/tasker/rqpjyv22lnM
Author of Total Commander
https://www.ghisler.com
Hurdet
Power Member
Power Member
Posts: 590
Joined: 2003-05-10, 18:02 UTC

Post by *Hurdet »

I use IntentTask that wait for response but not get value in variable from tc intent.
Do it is NOT possible to send a intent to tasker from tc button?
Hurdet
Power Member
Power Member
Posts: 590
Joined: 2003-05-10, 18:02 UTC

Post by *Hurdet »

When i true this shell:

am broadcast -a com.ghisler.android.TotalCommander.TotalCommander -e ghisler_fileName "/storage"

it not work.
Do it need root?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 43436
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This would send an intent to all apps implementing the action named "com.ghisler.android.TotalCommander.TotalCommander". However, this isn't an action, it's the name of the class of the main Total Commander window. It implements actions like "org.openintents.action.VIEW" for MIME type "vnd.android.documents/directory" and "resource/folder". However, multiple file managers may answer to this action.
Author of Total Commander
https://www.ghisler.com
Lee321987
Junior Member
Junior Member
Posts: 10
Joined: 2021-12-10, 21:44 UTC

Re: How to use TC4A with 'Tasker' ?

Post by *Lee321987 »

Is there any way to get TC to open to a directory that is on a Windows PC (using the TC LAN plugin)?
I tried:

Code: Select all

ghisler_fileName:smb://<ip address>/music/
but that didn't work.

This is my Tasker task to set both the active and inactive panels of TC to specific directories (if anyone sees any mistakes please let me know):

Code: Select all

    A1: Send Intent [
         Action: com.ghisler.android.TotalCommander.TotalCommander
         Cat: None
         Mime Type: resource/folder
         Data: ghisler_fileName:/storage/
         Extra: ghisler_fileName2:/storage/emulated/0/
         Package: com.ghisler.android.TotalCommander
         Class: com.ghisler.android.TotalCommander.TotalCommander
         Target: Activity ]
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 43436
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How to use TC4A with 'Tasker' ?

Post by *ghisler(Author) »

Is there any way to get TC to open to a directory that is on a Windows PC (using the TC LAN plugin)?
No, you can't do that, you need to create a connection in the LAN plugin and go to the directory you want to open via Tasker. You can then see the path you need to use in Tasker, e.g.
///LAN/connection_name/subdirectory
Author of Total Commander
https://www.ghisler.com
Post Reply