B4A Library [Lib] Contacts (OPEN SOURCE)

Tayfur

Well-Known Member
Licensed User
Longtime User
Hello;
firstly; i apologize for disturbing when you on vacation.

I cancelled facerecord method.

This is very same my orginal code. it has only one button. This button save 4 records ( code added ".Demo."&Name, Therefore; you can find easly fake records. )
and yopu please check logs.

Very important issue @Serjoscha Bald , AFTER HOLIDAYS...
 

Attachments

  • Contac_backup_fake.zip
    187 KB · Views: 263

Serjoscha Bald

Member
Licensed User
Longtime User
Hi Tayfur,

i had wrote my own test program, and yes i get the same error like you. I had tested a little bit around and found something that should be interesting.
The app i wrote backups all contacts that was found by the contact book class and it can restore these contacts.

So first i have create a backup of all my contacts on the real android device. Next i have copied the created file to a virtual android (5.1.1).
Then i had started the restore process. While restoring the contacts i get an exception on the new function ReadFrom in ContactItemSnapshot class.
It should be a bug, i will look later whats going wrong here. Some of the contacts are restored correctly. No error "raw contact id".
Now i start the restoring again. And yes there is the error. It seems to be that when you add a contact twice android removes it while you adding all entries
to the contact. After that i removed all contacts on the virtual android and add only one contact. While the app adds the contact again i get an error "raw id".
The app adds first the display name, then the structured name, addresses, email addresses and before events can be added the contact was removed by android.

I had not tested yet if it will be when a fake/other name will be used then the existing contact.
 

Tayfur

Well-Known Member
Licensed User
Longtime User

Thank you for feedback @Serjoscha Bald
when you fix it? Next week?
 

Serjoscha Bald

Member
Licensed User
Longtime User
Hi Tayfur,

i will fix the bug in ReadFrom method of ContactItemSnapshot class. But the "RAW ID" problem can not be fixed. I think the android system check's the contacts and removes a contact automaticly if it exists already. I don't know in which cases. On my last tests the android system removes the contact after adding a already exisiting email address. What will the android system do when the email addresses will be added at last? That should be tested.

What i can do is to add an exception "RAW ID LOST" or an event so that your app knows that the ContactItem was now invalid / removed.
 

Tayfur

Well-Known Member
Licensed User
Longtime User

hello;

do you have anyway a new record or change with ID.
I think, OS works with ID number.

do @Erel have any idea on "contactsutils class (if your lib has this class)"
 

Serjoscha Bald

Member
Licensed User
Longtime User
Hello Community,

Lib Contacts is now open source. I have no time to fix or add features because work and family needs the time.
Feel free to add, change or use the code in your code. Please upload bugfixes for the community here.

I hope you will enjoy it.

Most of the functions are commented.

Have a nice day.
 

vvg

Member
Licensed User
Longtime User

Problem Resolved, Thank You
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…