Comments (9)
I had the same problem. For solving this problem you should apply permissions on write data in contacts. It's a dangerous permissions, so add permission only in manifest is not enough. For call window applying or dinying permissions you can use permission_handler 4.2.0 .
await PermissionHandler().requestPermissions([PermissionGroup.contacts]);
After calling this method you can apply permission and contact will be added. By the way, this solution is needed only for android devices with Android 6.0 (API level 23) or higher. In lower versions you apply all permissions, when install your app.
This question is on StackOverFlow. You can raise a question and answer this on StackOverFlow to inform more people.
https://stackoverflow.com/questions/57969216/getting-this-error-unhandled-exception-formatexception-invalid-envelope-wh/59891554#59891554
from flutter_contacts.
I am getting the same issue. Let me know if you need help to reproduce.
from flutter_contacts.
Same problem here!!
from flutter_contacts.
@Rajeshhmuthyala @COCPORN @hsult4n please post steps / code to reproduce. Thanks
from flutter_contacts.
Disclaimer: I am totally new to flutter. I can provide a full repo that compiles and runs, but this here is the offending code:
void _saveNumber() {
debugPrint('Saving number ${numberController.text}');
PostalAddress address = PostalAddress(label: "Home");
Contact contact = Contact(
displayName: nameController.text,
givenName: nameController.text,
phones: [Item(label: 'mobile', value: numberController.text)],
postalAddresses: [address]
);
ContactsService.addContact(contact);
setState(() {
numberController.text = '';
nameController.text = '';
});
}
from flutter_contacts.
same problem... any solutions?
from flutter_contacts.
The same problem
from flutter_contacts.
@AndreyMolochko 's answer worked for me, thanks!
from flutter_contacts.
#60 (comment) looks like the working solution here. Closing this issue.
from flutter_contacts.
Related Issues (20)
- Update contact and delete contact not working HOT 9
- ...
- LOOKING FOR CONTRIBUTORS HOT 7
- java.lang.NoClassDefFoundError HOT 1
- Contact saved with wrong label HOT 3
- Exception when you cancel editing contact on android HOT 1
- I want birthday without year HOT 1
- OpenContactForm should take initial Contact HOT 3
- ios contacts HOT 2
- ContactsServicePlugin.java line 521 flutter.plugins.contactsservice.contactsservice.ContactsServicePlugin.getCursor HOT 1
- A problem occurred configuring project ':contacts_service'. HOT 1
- openContactForm initial value
- need to update all package
- Update package
- Phone number label not being persisted when adding a Contact
- Here are 201 public repositories matching this topic... HOT 1
- Here are 201 public repositories matching this topic... HOT 6
- error Android
- Upgrade package?
- doesn't access contacts in release mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_contacts.