Notification event

1,703 views
Skip to first unread message

Raul SC

unread,
Apr 29, 2017, 9:16:03 AM4/29/17
to Tasker
I have problems with the "notification" event

I try to use it to read incoming WhatsApp messages, but it almost always repeats the first message.

For example, if I receive three messages;

 - One

 - Two

 - Three

The value of variable %evtprm3 will always or almost always be "one"

I have tested with different priorities, and checked the box for "New only" but the result is always the same.

I use a Xiaomi MI5S with Android 6.0.1

See if anyone knows a solution, a greeting.
Message has been deleted

Charles Bernard

unread,
Apr 30, 2017, 3:56:58 AM4/30/17
to Tasker
the AutoNotification plugin for Tasker will give you way more control to narrow down each notification individually. the only problem for me personally was that it took me almost as long to learn how to use the plugin for my needs as it did to learn Tasker to begin with.

Gilles P

unread,
Apr 30, 2017, 4:27:53 AM4/30/17
to Tasker
the AutoNotification plugin for Tasker will give you way more control to narrow down each notification individually. the only problem for me personally was that it took me almost as long to learn how to use the plugin for my needs as it did to learn Tasker to begin with.

That's my problem with joaoapps plugins too.
I've purchased a few (including AutoNotification) which have proven to be highly powerful, complete, effective, and worth the price, but I often feel missing an extensive, text/html based, all in one, documentation when I've to write a task using one of them.

Raul SC

unread,
Apr 30, 2017, 9:30:39 AM4/30/17
to Tasker
Attempt or use plugin, and to access the text of the notifications, it should be possible to do only with Tasker.

Raul SC

unread,
May 10, 2017, 5:34:29 PM5/10/17
to Tasker
Pent, I imagine how busy you are working for the update, but I only ask you a few minutes so you can help me detect that it is failing.
As I mentioned, I try to use% evtprm3 to read the title of WhatsApp notifications, but I can not or I always throw the contents of the first message.
a greeting

Pent

unread,
May 11, 2017, 1:05:11 AM5/11/17
to Tasker


For example, if I receive three messages;

 - One

 - Two

 - Three

The value of variable %evtprm3 will always or almost always be "one"

Looked at the other %evtprm values ?

Pent

Raul SC

unread,
May 11, 2017, 1:35:22 AM5/11/17
to Tasker
Yes, I've looked up evtprm10, and also evtprm(), but it repeats the same value, every time a notification arrives

Pent

unread,
May 11, 2017, 1:53:12 AM5/11/17
to Tasker

Yes, I've looked up evtprm10, and also evtprm(), but it repeats the same value, every time a notification arrives

I was thinking more %evtprm1 %evtprm2 etc

It's also curious that the text in the notification is capitalized but not in %evtprm3.

Pent

Raul SC

unread,
May 11, 2017, 8:59:05 AM5/11/17
to Tasker
I think because of the Google translation, you misunderstand me. Here is the profile of Tasker.

Profile: Event / UI / Notification (Owner Application - WhatsApp)

Input task: Alert / Flash

% evtprm1
% evtprm2
% evtprm3
% evtprm4
% evtprm5
% evtprm6
% evtprm7
% evtprm8
% evtprm9
% evtprm10
% intent_data
% evtprm ()

The first WhatsApp message works fine. (%evtprm1 = WhatsApp,%evtprm2 = contact name,% evtprm3 = message text)

The problem is that every time a new message arrives, it returns the same result as the first message. And this happens whenever there is a Whatsapp notification in the notification bar.

I hope it will be understood better now, and there will be no problems with the translation. A greeting.

Pent

unread,
May 11, 2017, 9:39:54 AM5/11/17
to Tasker

The problem is that every time a new message arrives, it returns the same result as the first message.


Is there are a large time between each message, or are they immediately after each other ?

Please try setting 'Collision Handling' in task properties to Run Both. Maybe you're getting
multiple tasks trying to run at the same time and you only see the first one each time.

Also check Menu / More / Run Log to do with that.


Pent

Raul SC

unread,
May 11, 2017, 10:36:52 AM5/11/17
to Tasker
Regardless of the time between message and message, I always have the same error.

To prevent multiple tasks from working at the same time, I have deleted all projects, profiles and tasks from Tasker and I am only working with the task I have indicated previously. Also, I have also tried the three options of "Collision Handling" and I always have the same problem.

Below, I copy the execution log. (I've never used it until now, I hope I'm not mistaken)

I have activated the execution log and sent 5 whatsapp messages to my phone. The messages were 1, 2, 3, 4 and 5 respectively.
Tasker, showed 2 flashes for each of the incoming messages, except for the first message that only showed a flash.

Message 1
Flash: %evtprm3 = 1

Message 2
Flash 1: %evtprme3 = 1
Flash 2: %evtprm3 = 2 new messages.

Message 2
Flash 1: %evtprme3 = 1
Flash 2: %evtprm3 = 2 new messages.

Message 3
Flash 1: %evtprme3 = 1
Flash 2: %evtprm3 = 3 new messages.

Message 4
Flash 1: %evtprme3 = 1
Flash 2: %evtprm3 = 4 new messages.

Message 5
Flash 1: %evtprme3 = 1
Flash 2: %evtprm3 = 5 new messages.

Only show %evtprm3 to summarize.

//////

20170511 16.10.17 P Instant ID6 Notificación WhatsApp, *, *, *, *, *, Apagado
20170511 16.10.17 E Start ID0:0.0 TaskService
20170511 16.10.17 T Running ID4 Flash evtprm
20170511 16.10.17 A OK ID4.1 Flash evtprm.Flash
20170511 16.10.17 T ExitOK ID4 Flash evtprm
20170511 16.10.17 E Stop ID0:0.0 TaskService
20170511 16.10.31 P Instant ID6 Notificación WhatsApp, *, *, *, *, *, Apagado
20170511 16.10.31 E Start ID0:0.0 TaskService
20170511 16.10.31 T Running ID4 Flash evtprm
20170511 16.10.31 A OK ID4.1 Flash evtprm.Flash
20170511 16.10.31 T ExitOK ID4 Flash evtprm
20170511 16.10.31 P Instant ID6 Notificación WhatsApp, *, *, *, *, *, Apagado
20170511 16.10.31 E Stop ID0:0.0 TaskService
20170511 16.10.31 E Start ID0:0.0 TaskService
20170511 16.10.31 T Running ID4 Flash evtprm
20170511 16.10.31 A OK ID4.1 Flash evtprm.Flash
20170511 16.10.31 T ExitOK ID4 Flash evtprm
20170511 16.10.31 E Stop ID0:0.0 TaskService
20170511 16.10.45 P Instant ID6 Notificación WhatsApp, *, *, *, *, *, Apagado
20170511 16.10.46 E Start ID0:0.0 TaskService
20170511 16.10.46 T Running ID4 Flash evtprm
20170511 16.10.46 A OK ID4.1 Flash evtprm.Flash
20170511 16.10.46 T ExitOK ID4 Flash evtprm
20170511 16.10.46 P Instant ID6 Notificación WhatsApp, *, *, *, *, *, Apagado
20170511 16.10.46 E Stop ID0:0.0 TaskService
20170511 16.10.46 E Start ID0:0.0 TaskService
20170511 16.10.46 T Running ID4 Flash evtprm
20170511 16.10.46 A OK ID4.1 Flash evtprm.Flash
20170511 16.10.46 T ExitOK ID4 Flash evtprm
20170511 16.10.46 E Stop ID0:0.0 TaskService
20170511 16.11.25 P Instant ID6 Notificación WhatsApp, *, *, *, *, *, Apagado
20170511 16.11.25 E Start ID0:0.0 TaskService
20170511 16.11.25 T Running ID4 Flash evtprm
20170511 16.11.25 A OK ID4.1 Flash evtprm.Flash
20170511 16.11.25 T ExitOK ID4 Flash evtprm
20170511 16.11.25 E Stop ID0:0.0 TaskService
20170511 16.11.26 P Instant ID6 Notificación WhatsApp, *, *, *, *, *, Apagado
20170511 16.11.26 E Start ID0:0.0 TaskService
20170511 16.11.26 T Running ID4 Flash evtprm
20170511 16.11.26 A OK ID4.1 Flash evtprm.Flash
20170511 16.11.26 T ExitOK ID4 Flash evtprm
20170511 16.11.26 E Stop ID0:0.0 TaskService
20170511 16.11.40 P Instant ID6 Notificación WhatsApp, *, *, *, *, *, Apagado
20170511 16.11.40 E Start ID0:0.0 TaskService
20170511 16.11.40 T Running ID4 Flash evtprm
20170511 16.11.40 A OK ID4.1 Flash evtprm.Flash
20170511 16.11.40 T ExitOK ID4 Flash evtprm
20170511 16.11.40 P Instant ID6 Notificación WhatsApp, *, *, *, *, *, Apagado
20170511 16.11.40 E Stop ID0:0.0 TaskService
20170511 16.11.40 E Start ID0:0.0 TaskService
20170511 16.11.40 T Running ID4 Flash evtprm
20170511 16.11.40 A OK ID4.1 Flash evtprm.Flash
20170511 16.11.40 T ExitOK ID4 Flash evtprm
20170511 16.11.40 E Stop ID0:0.0 TaskService

Pent

unread,
May 11, 2017, 11:23:47 AM5/11/17
to Tasker
I don't use WhatsApp, but I would assume that it shows only the first message if you've got multiple ?
Or did the WhatsApp notification show a 5 after you'd sent all the messages ?


I have activated the execution log and sent 5 whatsapp messages to my phone. The messages were 1, 2, 3, 4 and 5 respectively.

And no where in any of the %evtprm() at any time was a mention of 2, 3, 4 or 5 ?

Pent

Raul SC

unread,
May 11, 2017, 12:31:31 PM5/11/17
to tas...@googlegroups.com
I don't use WhatsApp, but I would assume that it shows only the first message if you've got multiple ?
Or did the WhatsApp notification show a 5 after you'd sent all the messages ?

In a certain part you are right, but it is not quite correct.
When a whatsapp message arrives, the sender's name and message text appear in the notification bar. And every time a new message arrives, instead of displaying the name and text of the sender, the notification shows "2 new messages", "3 new messages", "4 new messages", etc. However, by extending the notification, you can view the contents of all messages in the notification bar.

It seems that the problem is, that Tasker can only access the reduced notification.

The case is that it is several applications that if it has access to the entire notification, even to what is not shown until it is widened, among others the plugin "Autonitification", so I think there must be some way to get it.

I have been doing useless tests, trying to hear from Tasker a "broadcast received" containing the notification, but I can not find anything, I do not even know if there is a "broadcast received" for that. (It is difficult for my limited knowledge)

And no where in any of the %evtprm() at any time was a mention of 2, 3, 4 or 5 ?

No,% evtprm () only contains what corresponds to the first message, or "2 new messages", "3 new messages", etc. Well, actually some% evtprm show other date, but in no case the text of the message. 

I attached some screenshots so that you can see it more clearly.

Libre de virus. www.avast.com

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/N2GTA8NoyxY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Screenshot_2017-05-11-17-43-41-895_com.miui.home.png
Screenshot_2017-05-11-17-43-23-504_com.miui.home.png
Screenshot_2017-05-11-17-44-37-449_com.miui.home.png
Screenshot_2017-05-11-18-08-10-639_com.miui.home.png

Pent

unread,
May 11, 2017, 12:51:24 PM5/11/17
to Tasker

When a whatsapp message arrives, the sender's name and message text appear in the notification bar. And every time a new message arrives, instead of displaying the name and text of the sender, the notification shows "2 new messages", "3 new messages", "4 new messages", etc. However, by extending the notification, you can view the contents of all messages in the notification bar.

OK, I'll look see if there are any other sources of text in the notification structure I might
have missed.

Pent

Raul SC

unread,
May 11, 2017, 12:54:44 PM5/11/17
to tas...@googlegroups.com
As always, thank you very much for your attention, and please keep me informed of any news

--

Raul SC

unread,
May 26, 2017, 11:59:18 AM5/26/17
to Tasker
Hi pent, I do not intend to press, but I have a lot of intrigue for a project that I have half.

Is there any news regarding the notification event?

a greeting

Pent

unread,
May 26, 2017, 1:50:54 PM5/26/17
to Tasker
I havn't done anything with it yet, but I couldn't release anything until
the UI update is finished anyway, so it doesn't really matter what order
I do things.

Pent

Raul SC

unread,
May 26, 2017, 1:57:27 PM5/26/17
to Tasker
I assumed it would not be implemented until you were ready for the update, just wanted to know if it was finally possible to have full access to the notifications.

I will continue to wait, greetings.

Pent

unread,
May 29, 2017, 1:03:58 PM5/29/17
to Tasker
There seems to be a 'messages' sub-part of notifications since 7.0. Do you have
a 7.0+ device ?

Pent

Raul SC

unread,
May 29, 2017, 1:19:48 PM5/29/17
to Tasker
No, I have a Xiaomi Mi5S, and the Android version is 6.0.1

Before I had the One Plus One with the same version and I had the same problem.

Is it possible that the subsection you're talking about existed since Android 6?

Pent

unread,
May 30, 2017, 3:31:30 AM5/30/17
to Tasker

No, I have a Xiaomi Mi5S, and the Android version is 6.0.1

Before I had the One Plus One with the same version and I had the same problem.

Is it possible that the subsection you're talking about existed since Android 6?


Not according to the docs. I've added it in, put it won't help on your device.

I couldn't find anything else that's not already included. I'll put some debugging
in and if you could send me a log when the beta is out later this week maybe
there are some errors being shown retrieving the existing info already.

Pent

Raul SC

unread,
May 30, 2017, 8:38:38 AM5/30/17
to tas...@googlegroups.com
It is strange that nothing appears in the documents of Android 6, about modifications in the structure of notifications, because it is clear that there have been considerable changes.

In earlier versions of Android, I've typically used the% NTITLE variable, and I've never had problems similar to those I have with version 6.0.1.

When I have the beta installed, I will check its operation, and I will send you the Tasker logs.

As always, thank you very much for your attention, greetings.

--

Raul SC

unread,
Jun 4, 2017, 2:32:05 PM6/4/17
to Tasker
Hi Pent

Here I leave you the "execution record", which we agreed to send, using the beta version of Tasker.

I have sent five WhatsApp messages to react to the "notification received" event. The task only displays a flash with variable% evtprm ().

I have to add, that with other applications, it happens just like with WhatsApp.

I imagine that you will be very busy working on the release of the new version. I'm not in a hurry, but you already have it here for when you can work on this.

20170604 20.07.41 P Instant ID2 Notificación WhatsApp
20170604 20.07.41 E Start ID0:0.0 TaskService
20170604 20.07.41 T Running ID3 Anon
20170604 20.07.41 A OK ID3.1 Anon.Flash
20170604 20.07.41 T ExitOK ID3 Anon
20170604 20.07.42 E Stop ID0:0.0 TaskService
20170604 20.07.49 P Instant ID2 Notificación WhatsApp
20170604 20.07.50 E Start ID0:0.0 TaskService
20170604 20.07.50 T Running ID3 Anon
20170604 20.07.50 A OK ID3.1 Anon.Flash
20170604 20.07.50 T ExitOK ID3 Anon
20170604 20.07.50 P Instant ID2 Notificación WhatsApp
20170604 20.07.50 E Stop ID0:0.0 TaskService
20170604 20.07.50 E Start ID0:0.0 TaskService
20170604 20.07.50 T Running ID3 Anon
20170604 20.07.50 A OK ID3.1 Anon.Flash
20170604 20.07.50 T ExitOK ID3 Anon
20170604 20.07.50 E Stop ID0:0.0 TaskService
20170604 20.07.57 P Instant ID2 Notificación WhatsApp
20170604 20.07.57 E Start ID0:0.0 TaskService
20170604 20.07.57 T Running ID3 Anon
20170604 20.07.57 A OK ID3.1 Anon.Flash
20170604 20.07.57 T ExitOK ID3 Anon
20170604 20.07.57 E Stop ID0:0.0 TaskService
20170604 20.07.57 P Instant ID2 Notificación WhatsApp
20170604 20.07.57 E Start ID0:0.0 TaskService
20170604 20.07.57 T Running ID3 Anon
20170604 20.07.57 A OK ID3.1 Anon.Flash
20170604 20.07.57 T ExitOK ID3 Anon
20170604 20.07.57 E Stop ID0:0.0 TaskService
20170604 20.08.10 P Instant ID2 Notificación WhatsApp
20170604 20.08.10 E Start ID0:0.0 TaskService
20170604 20.08.10 T Running ID3 Anon
20170604 20.08.10 A OK ID3.1 Anon.Flash
20170604 20.08.10 T ExitOK ID3 Anon
20170604 20.08.10 P Instant ID2 Notificación WhatsApp
20170604 20.08.10 E Stop ID0:0.0 TaskService
20170604 20.08.10 E Start ID0:0.0 TaskService
20170604 20.08.10 T Running ID3 Anon
20170604 20.08.10 A OK ID3.1 Anon.Flash
20170604 20.08.10 T ExitOK ID3 Anon
20170604 20.08.10 E Stop ID0:0.0 TaskService
20170604 20.08.19 P Instant ID2 Notificación WhatsApp
20170604 20.08.19 E Start ID0:0.0 TaskService
20170604 20.08.19 T Running ID3 Anon
20170604 20.08.19 A OK ID3.1 Anon.Flash
20170604 20.08.19 T ExitOK ID3 Anon
20170604 20.08.19 E Stop ID0:0.0 TaskService
20170604 20.08.19 P Instant ID2 Notificación WhatsApp
20170604 20.08.19 E Start ID0:0.0 TaskService
20170604 20.08.19 T Running ID3 Anon
20170604 20.08.19 A OK ID3.1 Anon.Flash
20170604 20.08.19 T ExitOK ID3 Anon
20170604 20.08.19 E Stop ID0:0.0 TaskService

Pent

unread,
Jun 5, 2017, 7:13:30 AM6/5/17
to Tasker
Sorry but I need the 'long term' log:

http://tasker.dinglisch.net/userguide/en/faqs/faq-how.html#x2

Pent

Raul SC

unread,
Jun 5, 2017, 11:02:22 AM6/5/17
to Tasker
I have sent you an email with the log.txt file that contains the long-term execution log. If you prefer that I copy the contents of the file in this thread, tell me. a greeting

Isaac Nogueira

unread,
Jan 12, 2018, 6:58:17 AM1/12/18
to Tasker

Raul... have you find a solution for this problem?

I have just installed Tasker and I'm having these same issues.




On Saturday, April 29, 2017 at 10:16:03 AM UTC-3, Raul SC wrote:
I have problems with the "notification" event

I try to use it to read incoming WhatsApp messages, but it almost always repeats the first message.

For example, if I receive three messages;

 - One

 - Two

 - Three

The value of variable %evtprm3 will always or almost always be "one"

ChatBot Profesional

unread,
Jul 26, 2019, 5:13:23 PM7/26/19
to Tasker
Hello Raul, Now, Do you know how solution this problem?
Reply all
Reply to author
Forward
0 new messages