Skip to content Skip to sidebar Skip to footer

React Native: Add Custom Application Functionality To Native Contacts Application

I have tried doing some research around this, but seem to keep getting Whatsapp FAQ's. When I install Whatsapp on my Android device, then Go to my Android contacts list. Select

Solution 1:

This is not RN related.

Your RN app will need to include some Java components to support this, including a SyncAdapter.

Basically you need to go over the existing list of contacts on the device, and for each contact you wish to add custom-actions to, you'll create a new RawContact for your app and aggregate it with the existing contact so it'll be added to the existing one.

That new RawContact needs to include custom mimetype actions with instructions to the contacts app how to present your custom action and which intent to launch when it's clicked, see the following resources:

  1. https://stackoverflow.com/a/42642971/819355
  2. https://stackoverflow.com/a/42005334/819355
  3. https://developer.android.com/training/sync-adapters/creating-sync-adapter
  4. http://blog.udinic.com/2013/07/24/write-your-own-android-sync-adapter/
  5. http://blog.udinic.com/2013/04/24/write-your-own-android-authenticator/

Post a Comment for "React Native: Add Custom Application Functionality To Native Contacts Application"