-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Hi!
I'm trying to insert a contact into my SIM card. I've used such an approach as in the sample:
val result = Contacts(context).sim().insertWithPermission().simContact { name="a1"; number="321" }.commitWithContext()
The result is:
SimContactsInsert.Result {
isSuccessful: false
failureReasons: {NewSimContact(name=a1, number=321, isRedacted=false)=NAME_EXCEEDED_MAX_CHAR_LIMIT}
isRedacted: false
}
Also I ran the code according to the documentation:
var insertResult: SimContactsInsert.Result;
val newContact1 = NewSimContact(name = "abcdef", number = "1234567890")
val newContact2 = NewSimContact(name = "abcdfb", number = "1234567890")
val isSimCardReady = Contacts(this.applicationContext).sim().cardInfo.isReady // true
insertResult = Contacts(this.applicationContext)
.sim()
.insert()
.simContacts(newContact1, newContact2)
.commit()
And the result is the same.
Could you tell me what I did wrong regarding NAME_EXCEEDED_MAX_CHAR_LIMIT?
I really appreciate any help you can provide.
Andrii.
Reactions are currently unavailable
Metadata
Metadata
Labels
questionFurther information is requestedFurther information is requested
Projects
Status
Todo