bmatthias / kolab-android

Automatically exported from code.google.com/p/kolab-android
Other
0 stars 0 forks source link

Synchronize more than one email addresses/phone numbers fail #32

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a contact with two email address on both side
2. Synchronize using Kolab Client for Android
3. The application will crash

I see This:
Error while synchronizing: android.database.CursorIndexOutOfBoundsException: 
Index 2 requested, with a size of 2

Using KolabDroid-0.0.5.apk from the Download page.

I traced the bug and found it a problem of a cursor which is not resetet each 
time it should be iterated... See attachment.

Original issue reported on code.google.com by stefan.a...@gmail.com on 28 Dec 2010 at 11:53

Attachments:

GoogleCodeExporter commented 8 years ago
Hello Stefan,

thank you for your patch. But I think its not sufficient. If KolabAndroid needs 
to write the XML file for IMAP, it has to enumerate all mailadresses and phone 
numbers, i.e. mail1 mail2 and phone2 etc or something like that.

Also I'm currently working on our sync provider branch which will update all 
entries inside the contacts2.db rather than deleting all of them and creating 
new ones. I think its not that easy to determine which address to update if you 
have two email addresses of type home. So I'd rather support one email address 
and phone number of each type, i.e. HOME, WORK, MOBILE instead of 2 HOMEs for 
now.

I don't know what the others think about it, or if someone has an easy to 
implement solution for the problem mentioned above.

Original comment by STrille...@googlemail.com on 29 Dec 2010 at 7:27

GoogleCodeExporter commented 8 years ago
I get similar error messages when the client reads the messages in the imap 
folder:

Error while synchronizing: android.database.CursorIndexOutOfBoundsException: 
Index 2 requested, with a size of 2
Error while synchronizing: android.database.CursorIndexOutOfBoundsException: 
Index 1 requested, with a size of 1

Is this the same error or another one? Unfortunately I don't know the sources.

depending on which contacts I have changed.

For phone numbers and email addresses you could just compare both (new/old) 
lists and mark those addresses/phone numbers which occure in both lists. Then 
you know which items have to be deleted and which items have to be added. 

For counting addresses/numbers: The document at 
http://kolab.org/doc/kolabformat-2.0-html/c295.html talks about two home and 
two business phone numbers and no special number of email addresses. 

If you have more addresses or phone numbers, you could use add some special 
tags which must not be altered by other clients, e.g. <android-address> or 
something that can be shared with other clients like <additional-address>.

Original comment by keinstei...@gmail.com on 1 Jan 2011 at 8:54

GoogleCodeExporter commented 8 years ago
Could one of you please test the new version in the froyo branch of 
http://gitorious.org/kolab-android and see if this exception still occurs. I've 
changed the syncing behaviour of phone and email addresses, though I only 
support one of each type until now.

Original comment by STrille...@googlemail.com on 10 Jan 2011 at 10:21

GoogleCodeExporter commented 8 years ago
fixed in 0.8

Original comment by arthur.z...@gmail.com on 29 Jun 2011 at 8:06