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.
Asked
Active
Viewed 637 times
1 Answers
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:

marmor
- 27,641
- 11
- 107
- 150
-
My app is not a native application but a react project. – Aje Damilola Mar 17 '23 at 21:04
-
I understand, did you try adding the "" tag to your html code? it should launch the add contact screen – marmor Mar 17 '23 at 22:42
-
yes. but anyway i went around it by letting my server generate a .vcf file for the user to download. but i am still open for answers though – Aje Damilola Mar 31 '23 at 11:11