[android-developers] Re: Android Contacts backup and sync application
Have you got the solution? Actually I am also trying to do this task. On Thursday, March 31, 2011 5:55:01 PM UTC+5:30, UD wrote: Hi, I am working on a contacts backup and sync. The target is to send all details of all contacts to a server (custom protocol defined) as a backup. During initial launch of application, all the contacts will be queued and sent to the server. And after that, a background service will be running all time which will listen to new contact addition/ contact update, and this new/updated contact will be sent to server by the background service. I am using RawContactsEntityhttp://developer.android.com/reference/android/provider/ContactsContract.RawContactsEntity.html for fetching the records. I tried using ContentObserver on RawContacts/Data tables to get notification of contact addition or contact-change. But, AFAIK, the ContentObserver gives notification (onChange()) of changed data in table as a whole and not ID of individual record. Now my problem is, how to get the exact id's of changed/new records? I thought of creating a backup-table to compare with native contacts table and get the changed records. But as the number of contacts increase, the performance will decease drastically and this will hamper the battery life too. Can you suggest me, The best way for achieving this contacts backup operation from performance and memory usage point of view? Is there any other way for contacts sync operation? It would be very helpful if anyone can share examples which can help me in this. -- Regards, *Udayan Warnekar* -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Android Contacts backup and sync application
Uh, there's a complete sort-of-working-if-you-disregard-the- embarrassingly-huge-glaring-holes-in-the-default-contacts-app-that- Google-will-never-fix example @ developer.android.com. http://developer.android.com/resources/samples/SampleSyncAdapter/index.html On 31 mar, 14:25, Udayan Warnekar udayan.warne...@gmail.com wrote: Hi, I am working on a contacts backup and sync. The target is to send all details of all contacts to a server (custom protocol defined) as a backup. During initial launch of application, all the contacts will be queued and sent to the server. And after that, a background service will be running all time which will listen to new contact addition/ contact update, and this new/updated contact will be sent to server by the background service. I am using RawContactsEntityhttp://developer.android.com/reference/android/provider/ContactsContr... for fetching the records. I tried using ContentObserver on RawContacts/Data tables to get notification of contact addition or contact-change. But, AFAIK, the ContentObserver gives notification (onChange()) of changed data in table as a whole and not ID of individual record. Now my problem is, how to get the exact id's of changed/new records? I thought of creating a backup-table to compare with native contacts table and get the changed records. But as the number of contacts increase, the performance will decease drastically and this will hamper the battery life too. Can you suggest me, The best way for achieving this contacts backup operation from performance and memory usage point of view? Is there any other way for contacts sync operation? It would be very helpful if anyone can share examples which can help me in this. -- Regards, *Udayan Warnekar* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Contacts
Hi, the fact your got 3 account from the ContactsContract.Contacts.CONTENT_URI means they are not aggregated together. You can aggregate this those contacts using the default contact manager (com.android.contacts), or you can do it from the code. On 23 ינואר, 13:43, L0rdAli3n 42.john.doe.1...@googlemail.com wrote: Thanks for the link. Unfortunately I wasn't able to find the query. 3.614 lines of code are really hard to understand. Could you assist me? On 16 Jan., 08:05, Zsolt Vasvari zvasv...@gmail.com wrote: Hi, the source code to theContactsapp is available here: http://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;... As Dmitri mentioned it, if you see the desired list in theContacts app, dig into the source and find out what query it is issuing the ContactsProvider. And then you can issue the same query and get the same result. On Jan 12, 5:13 am, L0rdAli3n 42.john.doe.1...@googlemail.com wrote: Hi Community, I'm working on an app right now, which should handle the users contacts. But I have a basic problem: When I grab a list of all contactsfrom the ContactsContract.Contacts.CONTENT_URI I expect to get a list of all aggregated/mergedcontacts. For example the list should contain a contact John, Doe. Which also has a facebook contact an a twitter contact joined in this one John, Doe. But on the list ofcontactsgrabbed from ContactsContract.Contacts.CONTENT_URI I exptect only John, Doe. My problem is that when I do grab a list ofcontactsfrom ContactsContract.Contacts.CONTENT_URI I have a listitem for every single contact, so instead of one single item John, Doe I have three: - John, Doe (gmail) - Doe John (facebook) - Johnny (twitter) Why is that so and is there any way to get the list of aggegrated contacts? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Contacts
Thanks for the link. Unfortunately I wasn't able to find the query. 3.614 lines of code are really hard to understand. Could you assist me? On 16 Jan., 08:05, Zsolt Vasvari zvasv...@gmail.com wrote: Hi, the source code to the Contacts app is available here: http://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;... As Dmitri mentioned it, if you see the desired list in the Contacts app, dig into the source and find out what query it is issuing the ContactsProvider. And then you can issue the same query and get the same result. On Jan 12, 5:13 am, L0rdAli3n 42.john.doe.1...@googlemail.com wrote: Hi Community, I'm working on an app right now, which should handle the users contacts. But I have a basic problem: When I grab a list of all contacts from the ContactsContract.Contacts.CONTENT_URI I expect to get a list of all aggregated/merged contacts. For example the list should contain a contact John, Doe. Which also has a facebook contact an a twitter contact joined in this one John, Doe. But on the list of contacts grabbed from ContactsContract.Contacts.CONTENT_URI I exptect only John, Doe. My problem is that when I do grab a list of contacts from ContactsContract.Contacts.CONTENT_URI I have a listitem for every single contact, so instead of one single item John, Doe I have three: - John, Doe (gmail) - Doe John (facebook) - Johnny (twitter) Why is that so and is there any way to get the list of aggegrated contacts? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Contacts
Thanks for the link. Unfortunately I wasn't able to find the query. 3.614 lines of code are really hard to understand. Could you assist me? On 16 Jan., 08:05, Zsolt Vasvari zvasv...@gmail.com wrote: Hi, the source code to the Contacts app is available here: http://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;... As Dmitri mentioned it, if you see the desired list in the Contacts app, dig into the source and find out what query it is issuing the ContactsProvider. And then you can issue the same query and get the same result. On Jan 12, 5:13 am, L0rdAli3n 42.john.doe.1...@googlemail.com wrote: Hi Community, I'm working on an app right now, which should handle the users contacts. But I have a basic problem: When I grab a list of all contacts from the ContactsContract.Contacts.CONTENT_URI I expect to get a list of all aggregated/merged contacts. For example the list should contain a contact John, Doe. Which also has a facebook contact an a twitter contact joined in this one John, Doe. But on the list of contacts grabbed from ContactsContract.Contacts.CONTENT_URI I exptect only John, Doe. My problem is that when I do grab a list of contacts from ContactsContract.Contacts.CONTENT_URI I have a listitem for every single contact, so instead of one single item John, Doe I have three: - John, Doe (gmail) - Doe John (facebook) - Johnny (twitter) Why is that so and is there any way to get the list of aggegrated contacts? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Contacts
Hi, the source code to the Contacts app is available here: http://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;a=summary As Dmitri mentioned it, if you see the desired list in the Contacts app, dig into the source and find out what query it is issuing the ContactsProvider. And then you can issue the same query and get the same result. On Jan 12, 5:13 am, L0rdAli3n 42.john.doe.1...@googlemail.com wrote: Hi Community, I'm working on an app right now, which should handle the users contacts. But I have a basic problem: When I grab a list of all contacts from the ContactsContract.Contacts.CONTENT_URI I expect to get a list of all aggregated/merged contacts. For example the list should contain a contact John, Doe. Which also has a facebook contact an a twitter contact joined in this one John, Doe. But on the list of contacts grabbed from ContactsContract.Contacts.CONTENT_URI I exptect only John, Doe. My problem is that when I do grab a list of contacts from ContactsContract.Contacts.CONTENT_URI I have a listitem for every single contact, so instead of one single item John, Doe I have three: - John, Doe (gmail) - Doe John (facebook) - Johnny (twitter) Why is that so and is there any way to get the list of aggegrated contacts? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en