2

I have a web application that needs to add a phone number to the device's contact list. I need a way to display the android or IOS system UI prompt for adding a telephone number to the device.

1 Answers1

1

here's an intent you can launch via html / js on the Android browser:

intent://vnd.android.cursor.dir/raw_contact/#Intent;
    action=android.intent.action.INSERT;
    S.email=hello@world.com;
    S.phone=+1-212-555-1234
end;

you can launch the intent using href as a regular URL via:

<a href="intent://vnd.android.cursor.dir/raw_contact/#Intent;action=android.intent.action.INSERT;S.email=hello@world.com;S.phone=+1-212-555-1234end;">CLICK ME</a>

Sources:

  1. https://developer.android.com/training/contacts-provider/modify-data#create-an-intent
  2. https://developer.chrome.com/multidevice/android/intents
marmor
  • 27,641
  • 11
  • 107
  • 150