0

The simple and plain event profile from Event → UI → Notificationan app doesn't get triggered if the user (for which Tasker is running) is in background because "Notifications for other users do not appear until they are active." Any such profile never gets triggered when I'm running a secondary user in foreground and Tasker is running in the primary user's environment.

I've the Notification access to Tasker under Settings → Notification manager already enabled. So that's definitely not the roadblock here.

I hoped for finding the notification log's location and running Tasker's file modification event profile on the file, with certain tweaks I might add, but well, I ended up asking a separate question for that. See Where does Lollipop stores notification log?

So, what is the best course of action to consider here?

Please note that I can always periodically check the output of notification service using dumpsys or the function(s) mentioned here by Bo Lawson but periodically means that I'm certain not to be able to execute a task exactly when the notification arrives. I can definitely decrease the time period for periodical checks but that would cause too much CPU usage for every check and battery output is limited always.

If you're still wondering what my goal is: A notification for an app shows up (consider any app) for the primary user running in background. Tasker detects it and writes some text into a file.

Sounds easy! Right.

Oh, and if the goal can be achieved using some other means, then feel free to suggest them, with details.


I'm using a OnePlus One running COS12 (Xposed Framework installed) and several Android 5.1 ROMs. Tasker's version is 4.7u3.

  • I need some clarification before I can make any kind of recommendation for you but there is a change this isn't possible considering the system limitation. What kind of information do you want related to each notification? Do you want the app making the notification? Do you want the text from the notification? Some other detail I haven't mentioned? Once I have this I can give you a complete recommendation of what to do. – The3rdIcon Sep 23 '15 at 19:09
  • The action can be anything to perform once the profile triggers. Flexibility is the key. Currently, I want to write some text into a file when any notification (regardless of what it contains) from a particular app (such as WhatsApp, Facebook, KDEConnect, think of any app) comes into the system. – Firelord Sep 24 '15 at 4:14
0

Tasker by itself can only get the text displayed by each notification. In order to get the information I think you want you'll need to get a plugin called AutoNotification. The plug in will be able to get the Persistency Type, App Name, Package, Title, and text.

It's important to make sure Auto Notification has notification access via the notification intercept via Security > Notification access. This allows the lug in to read the notifications.

  • Could you give a use case with AutoNotification? Choose any of your app. I need a use case because I don't understand the working of AutoNotification. Also, did you test the method with multiple users? Thanks! – Firelord Sep 30 '15 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.