Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add whatsapp like options to contact whenever the is a new contact added to Contacts

I develop an app which needs to do 2 things:

  • Create a user account (like WhatsApp).
  • Whenever there is a new contact entry, if the contact is using my app, then immediately in the Contacts application show options "call" or "message" in the contact detail page.

Example

like image 627
Listo Avatar asked Mar 01 '17 07:03

Listo


People also ask

How applications like WhatsApp use your contact list?

Show activity on this post. In apps that use phone authentication like whatsapp: When any user opens to check his/her contacts, whatsapp will show only the contacts from your phone that are using whatsapp (like they filter your contacts).

Why is a newly added contact not showing in WhatsApp?

Open your phone's Settings, then tap Apps & notifications > WhatsApp > Permissions. Make sure all permissions are turned on. If the issue still isn't fixed, please contact your phone's manufacturer for more information regarding security permissions on your phone.

How do I limit WhatsApp access to contacts?

On an Android phone: Go to WhatsApp > Menu > Settings > Account > Privacy > Status, and select “My Contacts” “My Contacts Except” or “Only Share With.” For “My Contacts Except,” check off anybody who shouldn't see these status updates.

How do I know if someone has saved my number on WhatsApp without broadcasting?

Check the "READ BY" heading. Anyone who is able to read your message has your number in their contacts, so you should see the name of the contact whom you know has your phone number here. If you see the name of the person whom you wanted to check here, they have your phone number.


1 Answers

You need to create a SyncAdapter, this is basically a service that is able to sync contacts to/from a server, like Google does for Google Contacts, you can set it to be notified when a new contact is added, and have your SyncAdapter add the needed info to the contact so it'll show links to your app.

If you go to your phone settings > accounts, you can see Whatsapp and Google's SyncAdapters there, where you can turn them off/on.

To create a sync adapter, you can follow the official docs, or this great tutorial.

like image 132
marmor Avatar answered Sep 19 '22 16:09

marmor