0

This question is regarding permission requests.

I want to know whether it's necessary to request permission to access contacts in order to offer the functionality of allowing users to download a contact from an app and save it to their native contacts.

I want to know if it's necessary for the app to make this request to offer this functionality. If so, is this the case for both iOS and Android?

Thanks!

marmor
  • 27,641
  • 11
  • 107
  • 150
maria250
  • 1
  • 2
  • Is there any additional question after reading https://developer.android.com/guide/topics/permissions/overview ? "For example, if an app had previously requested and been granted the READ_CONTACTS permission, and it then requests WRITE_CONTACTS, the system immediately grants that permission without showing the permissions dialog to the user." What about https://developer.apple.com/documentation/contacts ? – U. Windl Feb 19 '19 at 23:34

1 Answers1

1

For Android only - the short answer is no. you can allow your users to add a new contact without any permission. To do that, call the following intent (here with example of adding the new contact with some phone numner):

Intent intent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI);
intent.putExtra(ContactsContract.Intents.Insert.PHONE, phoneNumber);
startActivity(intent);

You can check all the other types of info you can put on that contact here: https://developer.android.com/reference/android/provider/ContactsContract.Intents.Insert

Note that this method will open the contact-editor screen with that data pre-filled, in which the user can edit the info, and click "save" when done.

If you want the entire experience to be seamless and in the background without any user interaction, you will need the WRITE_CONTACTS permission, and to do that using ContactsContract APIs

marmor
  • 27,641
  • 11
  • 107
  • 150