Show tasker variables from plug

225 views
Skip to first unread message

John Doe

unread,
Nov 8, 2014, 4:54:26 AM11/8/14
to task...@googlegroups.com
Is it possible to show (in a plug) to the user the Tasker variables to be used in an editText field as Tasker does?

Pent

unread,
Nov 9, 2014, 3:59:05 AM11/9/14
to task...@googlegroups.com
Sorry, no, I feel that passing the plugin the names of all the variables the user has
created is a minor privacy breach.

Pent

John Doe

unread,
Nov 9, 2014, 5:35:11 AM11/9/14
to task...@googlegroups.com
Instead to pass to the plug all variables you could implement an api to simply open a dialog or something like this, without let the plug all the variables. For example you could create an ad-hoc activity with dialog theme and let the plug call startActivityForResult(). I think will help the user a lot.

Pent

unread,
Nov 9, 2014, 6:03:19 AM11/9/14
to task...@googlegroups.com
True, but an ID for the task and action being edited would have to be passed
around so Tasker knows what variables to display for selection.

I'll keep it in mind.

Pent

John Doe

unread,
Feb 21, 2015, 4:42:11 AM2/21/15
to task...@googlegroups.com
Is there any possibility to see that in Tasker 4.7?

Pent

unread,
Feb 21, 2015, 9:47:10 AM2/21/15
to task...@googlegroups.com
Sorry no, not in the medium term either.

Already made too many promises in the past I have to keep :-(

Pent

John Doe

unread,
Feb 21, 2015, 9:53:15 AM2/21/15
to task...@googlegroups.com
Ahahah you've got a long TODO list :D No problem, Pent.

Berna Bap

unread,
Feb 24, 2015, 11:58:50 PM2/24/15
to task...@googlegroups.com

Pent, I am a little confused by this topic... I can already use any global variable in an editText field of my plugin's EditActivity: http://youtu.be/RNvnGW3zJAI

Could you elaborate why is it a privacy breach passing the plugin just the name of global variables (built in + user created)?

I understand that some variable can have sensitive informations like passwords, etc... but I thought this kind of information should be stored to local variables that is specific to the task or scene in which they are used.

 

Pent

unread,
Feb 25, 2015, 4:12:36 AM2/25/15
to task...@googlegroups.com

Pent, I am a little confused by this topic... I can already use any global variable in an editText field of my plugin's EditActivity: http://youtu.be/RNvnGW3zJAI

Could you describe what you mean ? I have Flash disabled ATM.

Could you elaborate why is it a privacy breach passing the plugin just the name of global variables (built in + user created)?

I called it a 'minor' privacy breach.

I understand that some variable can have sensitive informations like passwords, etc... but I thought this kind of information should be stored to local variables that is specific to the task or scene in which they are used.

Probably it should, but users aren't like that.

Pent

Berna Bap

unread,
Feb 25, 2015, 11:00:45 AM2/25/15
to task...@googlegroups.com
This minor privacy breach is just about the user created variables or the built in variables which their name are know are also included?

I think will be useful for my plugin to have a list of variables to be used like you do with Tasker, even if is just the built in variables. 
I know I can create my self this list but every time you change/add/remove some variable I will need to also update it in my app.

John Doe

unread,
Feb 25, 2015, 12:37:13 PM2/25/15
to task...@googlegroups.com
It's the reason I asked this kind of feature. IMHO It's really worth for the user to select his variables even in a plugin activity. The use of built-in variables could be a first step however.

Jim Becker

unread,
Feb 25, 2015, 5:18:25 PM2/25/15
to task...@googlegroups.com
As an example, the system my group uses at work has an popup window that can get master data from SAP. When the user selects a field in that window, the value is placed in the appropriate field in our app. This is one way to implement this idea.
By using this method, the variables would be maintained in Tasker and only referenced from the plugin.

John Doe

unread,
Feb 17, 2017, 1:26:02 PM2/17/17
to Tasker - Developers
Any news about this point? Is it possible to let the user select at least built-in global variables from a plugin?

Pent

unread,
Feb 18, 2017, 3:08:04 AM2/18/17
to Tasker - Developers

Any news about this point? Is it possible to let the user select at least built-in global variables from a plugin?

I'm working on your Material Design feature request ATM :-)

Pent

John Doe

unread,
Feb 26, 2017, 5:06:31 AM2/26/17
to Tasker - Developers
How come the relevant variables passed to the plugin don't contain the plugin itself? I mean, if I create an action with plugin A and the action returns %foo, if I create another action with plugin A, %foo is not present in the array. Only Tasker variables are present (for example a variable set using the variable set action). Is it a bug?

John Doe

unread,
Feb 27, 2017, 2:38:33 PM2/27/17
to Tasker - Developers
can you clarify?

Pent

unread,
Feb 28, 2017, 2:21:45 AM2/28/17
to Tasker - Developers

How come the relevant variables passed to the plugin don't contain the plugin itself? I mean, if I create an action with plugin A and the action returns %foo

What exactly do you mean by 'the action returns %foo'. Where or via what call is %foo added to the returned intent ?
 
Pent

João Dias

unread,
Feb 28, 2017, 5:05:51 AM2/28/17
to task...@googlegroups.com
Pent, I think what he means is if a plugin action returns a variable and then that variable is not used in a Tasker action somewhere, then it won't show up in another plugin action. If the variable is used in a Tasker action (like a flash for example) then it'll show up in another plugin action.

Hope this helps.


--
You received this message because you are subscribed to the Google Groups "Tasker - Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taskerdev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John Doe

unread,
Feb 28, 2017, 12:26:04 PM2/28/17
to Tasker - Developers
How? Using the usual way to say to Tasker that the action will return a relevant variable. Nothing strange.  Something like that in the plugin edit activity:

   if ( TaskerPlugin.hostSupportsRelevantVariables( getIntent().getExtras() ) )
      TaskerPlugin.addRelevantVariableList( resultIntent, new String [] { 
         "%pcolour\nPet Colour\nThe colour of the pet <B>last bought</B>"
      } );

Steps to reproduce:

A1: Variable set %bar to hello
A2: Plugin action "action 1" (here you can see %bar), the "action 1" has %foo as returned variable
A3: Plugin action "action 2", here it's not possible to "see" the variable %foo

Pent

unread,
Feb 28, 2017, 12:36:59 PM2/28/17
to Tasker - Developers

A1: Variable set %bar to hello
A2: Plugin action "action 1" (here you can see %bar), the "action 1" has %foo as returned variable
A3: Plugin action "action 2", here it's not possible to "see" the variable %foo

And when editing A2 and A3, both return relevant variable %foo ? Or just A2 ?

Where are you hitting the variable selector when editing A3 ? In the If condition ?

Pent

John Doe

unread,
Feb 28, 2017, 12:41:05 PM2/28/17
to Tasker - Developers
No, only "action 1" returns %foo.

If condition?? I don't understand. I'm using a very simple code like that in the onCreate of the edit activity:

   if ( TaskerPlugin.hostSupportsRelevantVariables( getIntent().getExtras() ) )
      String [] passedNames = TaskerPlugin.getRelevantVariableList( getIntent().getExtras() );

Pent

unread,
Feb 28, 2017, 12:52:48 PM2/28/17
to Tasker - Developers


No, only "action 1" returns %foo.

OK.
 

If condition?? I don't understand.

Somewhere in the Tasker UI you are pressing a Variable tag, right ? Where is that ?

Pent

John Doe

unread,
Feb 28, 2017, 12:55:00 PM2/28/17
to Tasker - Developers
No, I'm not pressing any Variable tag button in Tasker or anything, just the + button in the task edit activity to add a new plugin action (A3 in my example).

Pent

unread,
Mar 1, 2017, 2:12:45 AM3/1/17
to Tasker - Developers
Ah, I finally got what you mean :-)

Bug, will fix.

Pent

João Dias

unread,
Mar 1, 2017, 5:58:30 AM3/1/17
to task...@googlegroups.com
Really, all this time this has been bugging me at it was not by design? :D I wish I had mentioned it sooner!

--
Reply all
Reply to author
Forward
0 new messages