• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help %PACTIVE - %PENABLED

I have a task that references %PACTIVE and %PENABLED. It parses the strings and displays them.

This task runs correctly if run from Tasker or a shortcut.

If this task is exported as an App and then installed ... when run it does not access the strings.

Why?

... Thom
 
I don't know what "profiles part of the compiled app" means. All I'm trying to access are two maintained global variables that list names.

... Thom
 
These variables are not global across your entire device. The profiles that set these variables, need to be part of your compiled app.

Every android app rums in its own space. This so called sandbox approach prevents apps from accessing data from other apps.

You must compile your entire project, including profiles, tasks and scenes (if any).
 
Thanks ... I'm still not tracking you.

If you access the Variable Select drop down in Tasker ...
%PACTIVE results from selecting Profiles Active
%PENABLED
results from selecting Profiles Enabled

... similar to ...
%VOLM results from selecting Volume - Media

... all three are resolved globally when run directly from Tasker or from a shortcut and only %VOLM is resolved when run from compiled.

Example in use ...

tla-Show-Profile
A1: Variable Set [ Name:%crlf To: Do Maths:Off Append:Off ]
A2: Variable Set [ Name:%active To:%PACTIVE Do Maths:Off Append:Off ]
A3: Variable Split [ Name:%active Splitter:, Delete Base:Off ]
A4: Array Process [ Variable:%active Type:Sort Alpha ]
A5: Variable Set [ Name:%enabled To:%PENABLED Do Maths:Off Append:Off ]
A6: Variable Join [ Name:%active Joiner:%crlf Delete Parts:Off ]
A7: Variable Split [ Name:%enabled Splitter:, Delete Base:Off ]
A8: Array Process [ Variable:%enabled Type:Sort Alpha ]
A9: Variable Join [ Name:%enabled Joiner:%crlf Delete Parts:Off ]
A10: Popup [ Title: Text:--- Active Profiles --- %active

--- Enabled Profiles --- %enabled Background Image: Layout:tla-Popup-1024 Timeout (Seconds):6 Show Over Keyguard:On ]

... Thom
 
The difference between %VOLM and %PACTIVE is that the first one is known by the OS and is your device-wide media volume level. It can be changed by apps that wish to do so, like media players and also tasker.

The list of active tasker profiles however, that's something the OS is unaware of. Its an internal variable in tasker, global within the tasker app, but once your project is compiled, its an internal global variable in your app and you our app alone. This is the sandbox I mentioned before.

If still unclear, don't hesitate to ask more.
 
Thanks.

There is just ambiguity in the usage of the term Global.

It is global within Tasker because it is a single app.

The Factory add-0n is introduces a new environment and redefines the definition of Global.

So there are really three classes of variables ...
Local
Tasker Gl0bal
Global​

... Thom
 
Correct, I call them local, global and system variables.
Local within a task, global across the app (or sandbox), and systemwide variables.
 
Back
Top Bottom