Whatsapp and AM

Post your questions and help other users.

Moderator: Martin

Post Reply
Xornop
Posts: 3
Joined: 02 Jul 2015 17:29

Whatsapp and AM

Post by Xornop » 02 Jul 2015 17:36

Hi I have made a simple flow, which makes AM read out my whatsapp message whenever i receive one. But after the message it say "1 new message" and when i have 2 mssages it reads something like "at 179000 2 new messages"

How do i make it not say the amount of messages received? In other words; can i, and how, add an exception to what it reads out?
Attachments
flow_Speak_Notification_Text_20150702_193518.xml
(1.85 KiB) Downloaded 800 times

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Whatsapp and AM

Post by Martin » 03 Jul 2015 09:43

Hi,

You could use an action Script that either removes the last few lines of the text or you could use a regular expression to replace the new messages pattern (see function replaceAll).
Maybe Whatsapp also shows the number when the previous notification is not removed. You could try to remove the Whatsapp notification with action Remove Notification on Statusbar when the flow runs.

Regards,
Martin

Xornop
Posts: 3
Joined: 02 Jul 2015 17:29

Re: Whatsapp and AM

Post by Xornop » 09 Jul 2015 10:30

Martin wrote:Hi,

You could use an action Script that either removes the last few lines of the text or you could use a regular expression to replace the new messages pattern (see function replaceAll).
Maybe Whatsapp also shows the number when the previous notification is not removed. You could try to remove the Whatsapp notification with action Remove Notification on Statusbar when the flow runs.

Regards,
Martin
Thanks, I am unexperienced with scripting, can you give me an example of how i should go about this?

User avatar
Rhonin
Posts: 19
Joined: 08 Apr 2015 05:23

Re: Whatsapp and AM

Post by Rhonin » 13 Jul 2015 12:59

Hi Xornop,

you could have a look at my attempt to succeed in reading WhatsApp aloud...

->

http://automagic4android.com/forum/view ... f=3&t=3923

I had to modify the text via script a little to get rid of surplus signs... so maybe this could be a good point for you to start...

At the moment i struggle with the audiofocus feature ...

Cheers

Rhonin
Automagic on rooted Xperia Z3c running on Android 5.1.1

Post Reply