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

Tasker as an app with subtasks / multiple notifications

Hi,

I am new to Tasker. I am using v5.1 on Google Pixel 2 running Android 8.1.

I couldn’t find an answer to my questions:

1. I have a parent task that checks that a sub task is started or not. If it’s not, then it starts it. Is it possible to export my parent task as an app using the app factory such that when I install it on another device, the app contains the sub task?

2. I have a simple app that generates a test notification. While the notification is visible, if I run the task again, it overrides the previous notification. There’s no race condition as both the notifications are triggered seconds apart. Is it possible to combine the contents of the two notifications or have them separate with Tasker alone (without using Tasker AutoNotification)?

Regards
AK
 
Your first question ...

There are three groupings in Tasker that people learn about as they develop more and more complicated solutions.
  • Tasks consist of multiple actions. A task has an entry point and may have an exit point.
  • Profiles consist of a triggering area and one or two tasks. One task is invoked when you enter the profile and the other optional task is invoked when you exit the profile.
  • Projects consists of zero or more profiles and one or more tasks.
You can export a task, profile, or project into am APK.

The answer to your first question is yes and you need to investigate Projects. To test an exported project you will need to have a device that does not have Tasker installed.

The most complicated APK I have to date has 4 profiles and 12 tasks.

The disadvantage of a project is that the profiles and tasks will take up storage space when they are not being used. A good example is an initialization task for the project that is only run once. The solution is to make it a separate Project. The disadvantage is that there are then two projects (and two APKs) that are needed.

Your second question .,,

As stated it is open to a lot of interpretation.

I suppose you could have a project with two tasks and each of those tasks could create a notification independently. I have not tried it yet.

If there are two tasks in a project then they can communicate with each other using global variables. A single notification could contain information from a displayed notification and a redisplayed replacement notification containing the original information and added information.

Nailing down what is local and what is global in a project that is going to be exported can be challenging.

... Thom
 
Hi Thom,

Thank you very much for the tips. I did not have concept of "projects" and I thought that a "profile" was that biggest container that could tie things together.

I tried briefly with a small project. It has certainly solved the first problem and I have a hunch that that second won't be far away either. I have a hunch that when run as an app, the multiple notification issue is not there (i.e. the app can create many notifications which get grouped together by the OS) and only happens when run via tasker as a "task".

Regards
AK
 
Back
Top Bottom