[android-developers] Re: Grab phonebook-contacts via ContactsContract-API

2011-01-27 Thread L0rdAli3n
Very nice! Thanks Pepijn, that's what I was looking for :) Maybe you could explain in a few words, how I'm supposed to manage the http session of this account? I need to store two cookies and the sessionID to maintain my session. Where to store them and how can other applications reuse the session

Re: [android-developers] Re: Grab phonebook-contacts via ContactsContract-API

2011-01-26 Thread Dmitri Plotnikov
Oh yeah - much better. On Jan 26, 2011 1:12 PM, "Pepijn Van Eeckhoudt" wrote: > I think AccountManager#setUserData is what you should use to store additional account data. At least that's what I did in my application and it works as I expected. > > Pepijn > > Op 26 Jan 2011 om 21:58 heeft Dmitri P

Re: [android-developers] Re: Grab phonebook-contacts via ContactsContract-API

2011-01-26 Thread Pepijn Van Eeckhoudt
I think AccountManager#setUserData is what you should use to store additional account data. At least that's what I did in my application and it works as I expected. Pepijn Op 26 Jan 2011 om 21:58 heeft Dmitri Plotnikov het volgende geschreven: > I think it is just a string that AccountManage

Re: [android-developers] Re: Grab phonebook-contacts via ContactsContract-API

2011-01-26 Thread Dmitri Plotnikov
I think it is just a string that AccountManager can store for you. How you use it is up to you. I don't know what URL you need to keep per account, but can't you pretend that the URL is an auth token? I am not 100% on this, because I haven't used authtoken this way myself. On Jan 26, 2011 12:43

[android-developers] Re: Grab phonebook-contacts via ContactsContract-API

2011-01-26 Thread L0rdAli3n
I thought the authentication token is something specific to the session, like a sessionID or something? I'm a little bit confused now. On 26 Jan., 20:41, Dmitri Plotnikov wrote: > Take a look at AccountManager > docs:http://developer.android.com/intl/en/reference/android/accounts/Accou... > > Ac

Re: [android-developers] Re: Grab phonebook-contacts via ContactsContract-API

2011-01-26 Thread Dmitri Plotnikov
Take a look at AccountManager docs: http://developer.android.com/intl/en/reference/android/accounts/AccountManager.html AccountManager supports the notion of authentication token, which is what I think you need. Cheers, - Dmitri On Wed, Jan 26, 2011 at 10:26 AM, L0rdAli3n <42.john.doe.1...@googl

[android-developers] Re: Grab phonebook-contacts via ContactsContract-API

2011-01-26 Thread L0rdAli3n
Ok, I'm about to write the SyncAdapter part of my App. Due to the fact that I have a special case, I'm a little bit stuck: Additional to the username/password I need to store a URL on a per account base! How I'm supposed to store this extra information, attached to an account? Thanks for your h

Re: [android-developers] Re: Grab phonebook-contacts via ContactsContract-API

2011-01-23 Thread Dmitri Plotnikov
Using ContentObserver for sync adapters does not sound like a good idea. There are several reasons for that: 1. Data change notifications are not delivered to processes that are not running. So if your sync adapter is not running for one reason or another (and the system kills processes when it n

Re: [android-developers] Re: Grab phonebook-contacts via ContactsContract-API

2011-01-23 Thread Dmitri Plotnikov
The answer is: yes you do. Your sync adapter will need to "adopt" the no-account contacts, otherwise some other syncadapter will claim them and then synchronization will become impossible. The no-account contacts literally have accountType=NULL so they are easy to find. Find them and assign the

[android-developers] Re: Grab phonebook-contacts via ContactsContract-API

2011-01-23 Thread L0rdAli3n
Thanks for those informationen Dmitri. To make it clear: I "just" want to sync the contacts a user saved on his local phonebook/adressbook (no gmailcontacts, no facebookcontacts, no twittercontacts) with openXChange. Do I really need a new AccountType then? So a user will have a openXChange-Contac

[android-developers] Re: Grab phonebook-contacts via ContactsContract-API

2011-01-21 Thread himanshu jain
Hi Dmitri ,@LordAli3n I have couple of questions please spare some time or guide me direction 1) Can we use syncAdapter to get data of a row of raw_contact table if that row has been affected (i.e added/deleted/edited). I know ContentObserver notify whenever raw_content table changes in onChange()

[android-developers] Re: Grab phonebook-contacts via ContactsContract-API

2011-01-19 Thread BoD
If I may intervene. It seems to me that the OP wants to synchronize contacts using the sync adapters APIs, and therefore wants to have his own account type, and raw contacts in this account. But that means that when the user first starts using this app, this account will be empty, and will synchro

Re: [android-developers] Re: Grab phonebook-contacts via ContactsContract-API

2011-01-19 Thread Dmitri Plotnikov
I am sorry. I guess I just don't understand the requirements. I thought you were writing a sync adapter. Sync adapters all deal with their own accounts. Google sync adapter deals with google accounts, exchange adapter with exchange accounts and so on. If you are thinking of writing a sync adapt

[android-developers] Re: Grab phonebook-contacts via ContactsContract-API

2011-01-18 Thread L0rdAli3n
Thanks for your answer Dmitri! Could you explain in few words, how I can use the contacts the user stored on his phone, which in fact all have already an account_type, by introducing my own accout_type? On 14 Jan., 16:26, Dmitri Plotnikov wrote: > I don't fully understand your requirements, but