react-native-contacts
react-native-contacts copied to clipboard
Crash app when using writePhotoToPath in Android
I used the function writePhotoToPath to update avatar of the contact but i got this error
here is my code:
await Contacts.writePhotoToPath(
updatedContactPartial.recordID,
updatedData.avatar.uri,
);
updatedContactPartial.recordID is a id in contact list updatedData.avatar.uri is file:///data/user/0/com.myappname/cache/12787931-c614-4812-bd88-09cba908e878.JPEG
the full file image:
{"name": "12787931-c614-4812-bd88-09cba908e878.JPEG", "type": "image/jpeg", "uri": "file:///data/user/0/com.myappname/cache/12787931-c614-4812-bd88-09cba908e878.JPEG"}