select a Whatsapp contact

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
tsolignani
Posts: 187
Joined: 12 Jan 2019 11:53
Location: Vignola, Mo, Italy
Contact:

select a Whatsapp contact

Post by tsolignani » 01 Mar 2020 20:30

Good evening everyone.


The WhatsApp app sports an activity which is com.whatsapp.ContactPicker

If you launch it, you are faced with a contact picker where you actually can pick a contact.

I made it work with automagic, the matter is that I have no idea about how to get the value of the picked contact.

I tried with debug condition but there are no relevant variables.

Maybe I am missing something, could you please explain how I could retrive the data from the picked contact (ID? Name? Else?) and then use it into an automagic flow to, say, open a chat with that same contact to send him a message?

Thank you.

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: select a Whatsapp contact

Post by anuraag » 02 Mar 2020 00:58

flow_whatsapp_contacts_list_20200302_090551.xml
(4.44 KiB) Downloaded 1013 times

User avatar
tsolignani
Posts: 187
Joined: 12 Jan 2019 11:53
Location: Vignola, Mo, Italy
Contact:

Re: select a Whatsapp contact

Post by tsolignani » 02 Mar 2020 18:35

Thank you so much, it works like a charm!

Have a nice evening.

User avatar
tsolignani
Posts: 187
Joined: 12 Jan 2019 11:53
Location: Vignola, Mo, Italy
Contact:

Re: select a Whatsapp contact

Post by tsolignani » 02 Mar 2020 18:36

PS is there any documentation I can read about that? I mean extracting contact but even name or other contact's properties.

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: select a Whatsapp contact

Post by anuraag » 02 Mar 2020 21:16

There is no documentation. That contact picker activity only returns jid.

User avatar
tsolignani
Posts: 187
Joined: 12 Jan 2019 11:53
Location: Vignola, Mo, Italy
Contact:

Re: select a Whatsapp contact

Post by tsolignani » 05 Mar 2020 15:37

anuraag wrote:
02 Mar 2020 21:16
There is no documentation. That contact picker activity only returns jid.
Thank you, understood.

Still, how is one supposed to get to know that?

Did you get to know it because you happened to read something or is there a way to ask the activity regarding the values it returns?

Just to better understand, if I may ask.

Thank you.

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: select a Whatsapp contact

Post by anuraag » 05 Mar 2020 16:23

Read it on stackoverflow.com

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: select a Whatsapp contact

Post by Desmanto » 05 Mar 2020 18:47

@tsoliganani : Usually I just test and try to find any intent or activity using start activity or send broadcast. Sometimes I google the problem, but using keyword tasker (since their user base is higher and have higher chance that someone already ask about it and maybe get solution).

Other is you can try to check the manifest xml of the app (I usually use MiXplorer to check it), to see if there is any unique string that represent something I want to find. Next level is to use logcat and try to replicate the action first and check in the logcat for any pattern we can use.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply