How to use TC4A with 'Tasker' ?

Support for Android version of Total Commander

Moderators: Stefan2, white, sheep, Hacker

Post Reply
Hurdet
Senior Member
Senior Member
Posts: 424
Joined: 2003-05-10, 18:02 UTC

How to use TC4A with 'Tasker' ?

Post by *Hurdet » 2018-07-03, 08:24 UTC

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: 36554
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2018-07-03, 08:47 UTC

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
http://www.ghisler.com

Hurdet
Senior Member
Senior Member
Posts: 424
Joined: 2003-05-10, 18:02 UTC

Post by *Hurdet » 2018-07-03, 09:07 UTC

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: 36554
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2018-07-03, 09:48 UTC

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
http://www.ghisler.com

Hurdet
Senior Member
Senior Member
Posts: 424
Joined: 2003-05-10, 18:02 UTC

Post by *Hurdet » 2018-07-03, 09:51 UTC

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
Senior Member
Senior Member
Posts: 424
Joined: 2003-05-10, 18:02 UTC

Post by *Hurdet » 2018-07-05, 00:16 UTC

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: 36554
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2018-07-05, 07:42 UTC

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
http://www.ghisler.com

Post Reply