Post your questions and help other users.
Moderator: Martin
-
pmgnt
- Posts: 26
- Joined: 15 Jul 2016 00:34
Post
by pmgnt » 15 Jul 2016 07:03
Hello,
I found a tasker action/task on web that opens a certain whatsapp chat directly..
Intent is quite new to me so i was wondering if anyone is able to do the same using an AM action.
In tasker its a java script function which uses following data.
"#Intent;action=android.intent.action.MAIN;launchFlags=0x14000000;component=com.whatsapp/.Conversation;S.jid=4916308154711%40s.whatsapp.net;S.displayname=MaxMuster;end"
I tried Start Activity action but kept ending up somewhere in Main window of whatsapp
Any ideas?
Best regards & Thanks!
-
Martin
- Posts: 4468
- Joined: 09 Nov 2012 14:23
Post
by Martin » 15 Jul 2016 19:51
Hi,
You can use action
Start Activity with following configuration:
Action:
android.intent.action.MAIN
Explicit Component:
checked
Package Name:
com.whatsapp
Class Name:
com.whatsapp.Conversation
Extras:
putString("jid", "4916308154711@s.whatsapp.net");
putString("displayname", "MaxMuster");
The displayname-line is probably not required.
Alternatively you can also use action
Launch Shortcut to open a Whatsapp conversation if you don't want to replace the phone number dynamically.
Regards,
Martin
-
pmgnt
- Posts: 26
- Joined: 15 Jul 2016 00:34
Post
by pmgnt » 15 Jul 2016 22:26
Thank you!
Well, so i was closer than expected as i can see..
My keys in both putString lines were wrong, also
did not replace %40 with @.
Couldnt use start shortcut action as phone number changes...
Thank you again!
Found another way while messing with it.
Action: android.intent.action.SENDTO
Daten URI: sms:4916308154711
Explicit Component: checked
Package Name: com.whatsapp
Regards!
-
brunoaduarte
- Posts: 1
- Joined: 30 May 2020 15:30
Post
by brunoaduarte » 29 Oct 2020 20:37
Problem with this approach is that if the number is invalid no error is shown.