Problems using global variables within a tasker created app

201 views
Skip to first unread message

Steve K

unread,
Jul 4, 2013, 8:34:19 AM7/4/13
to tas...@googlegroups.com
Hi all,

I've just come across some unexpected variable behaviour and was wondering whether it's a bug within tasker or more likely, something I'm screwing up.

Basically, I've created a standalone app from a task that I created within tasker ... I used tasker's EXPORT function to create the app.
The way it's supposed to work is that I have the app on my homescreen and when I press it, one of it's jobs is to set a variable that I created earlier in tasker itself called %GLOBALWIFI to 1.

Indeed, the standalone app works perfectly in all respects however, here's the weird bit.

If I display (using a popup) the value of %GLOBALWIFI inside the app, it indeed shows as expected, a value of 1. But if I then go into tasker itself and look under the variables menu, I see the %GLOBALWIFI variable but it still has the original value of 0.

In fact, I can use any starting value e.g. 5 which I manually assign to the %GLOBALWIFI variable inside tasker and that value will NEVER change irrespective of my app confirming that I have changed the value of %GLOBALWIFI to 1 inside the app.

So my thinking is that even though an app created from tasker may seem to be using the SAME global variable name as one used in a task running inside tasker ... they are in fact 2 separate variables and can hold different values.

Any thoughts ?




Bob Hansen

unread,
Jul 4, 2013, 9:07:47 AM7/4/13
to tas...@googlegroups.com
Global variables are global in that the variables are available to the Tasker application and not limited to the current task. Global does not mean that the variables are available to all applications running in the operating system. An application created by Tasker's App Factory is an independent app and the created app does not share global variables.
Reply all
Reply to author
Forward
0 new messages