QuisApp / flutter_contacts

MIT License
83 stars 138 forks source link

openExternalInsert causing SecurityException #150

Closed nergal79 closed 3 months ago

nergal79 commented 6 months ago

AFAIK Opening external intent does not need any permission . When I m trying to add anew contact i'm getting SecurityException. https://developer.android.com/training/contacts-provider/modify-data

`static insertContact() {

Contact newContact = Contact(
    displayName: "John",
    name: Name(first: "John"),
    phones: [Phone("+878778788", label: PhoneLabel.mobile)]);

    FlutterContacts.openExternalInsert(newContact);
 }`

java.lang.SecurityException: Permission Denial: reading com.android.providers.contacts.ContactsProvider2 uri content://com.android.contacts/data from pid=17024, uid=11474 requires android.permission.READ_CONTACTS, or grantUriPermission()

Is there something wrong with my implementation ?

joachim-quis commented 3 months ago

This is probably the same issue as https://github.com/QuisApp/flutter_contacts/issues/156

It will be included in the next release.