[android-developers] Re: Questions about Two Way Sync Using SyncAdapter and SyncService in android

2011-02-03 Thread himanshu jain
Hi Dmitri, right now i am doing iterative development on emulator , i will later deploy it on actual device. I come across one issue if i call addAccount() from account manager as per the documentation my authenticator addAccount() does not get invoked although authenticar service and

[android-developers] Re: Questions about Two Way Sync Using SyncAdapter and SyncService in android

2011-02-03 Thread himanshu jain
Ignore previous question i figured out what was the problem !! thanks Can you suggest me do i really need to use Editor activity for showing all contact fields to user or i can utilize contact app native editor , i was wondering why by default app shows only two field first name and last name?.

[android-developers] Re: Questions about Two Way Sync Using SyncAdapter and SyncService in android

2011-02-01 Thread himanshu jain
Thanks Dmitri Plan A showing logs but still service not gets invoked Plan B i tried to put SampleSyncAdapter totally unchanged except i have to cheat for this line only ((AuthenticatorActivity) context).onAuthenticationResult(true) in NetworkUtilities rest all intact but still this one does not

[android-developers] Re: Questions about Two Way Sync Using SyncAdapter and SyncService in android

2011-02-01 Thread himanshu jain
here is the log accord according to Plan A and Plan B when i have SampleSyncAdapater running on Device A-OS 2.2 01-31 21:02:06.105: VERBOSE/SyncManager(206): [SyncManager.java: 653:sendCheckAlarmsMessage()] sending MESSAGE_CHECK_ALARMS 01-31 21:02:06.145: DEBUG/SyncManager(206):

Re: [android-developers] Re: Questions about Two Way Sync Using SyncAdapter and SyncService in android

2011-02-01 Thread Dmitri Plotnikov
All that stuff about duplicates looks a bit suspicious. I would try to uninstall all extra sync adapters. On Tue, Feb 1, 2011 at 10:56 AM, himanshu jain himanshu@gmail.comwrote: here is the log accord according to Plan A and Plan B when i have SampleSyncAdapater running on Device A-OS 2.2

[android-developers] Re: Questions about Two Way Sync Using SyncAdapter and SyncService in android

2011-01-31 Thread himanshu jain
@Dmitri Thanks a lot for spending time to answer my questions at least some doubts are faded off. 1) I understand to use own activity for editing and creating new contacts. 2) Ok, if i avoid ContentObserver even i had that in mind might require something to be running in background which is bad

Re: [android-developers] Re: Questions about Two Way Sync Using SyncAdapter and SyncService in android

2011-01-31 Thread Dmitri Plotnikov
Sending requestSync to contentresolver is the right way to go if you want an explicit button to request sync. This is what applications like Calendar and Gmail do when you push the Sync button. ContentProvider will also request sync whenever there is a change in the data. You should query raw

[android-developers] Re: Questions about Two Way Sync Using SyncAdapter and SyncService in android

2011-01-31 Thread himanshu jain
@Dmitri thanks once again But why my SyncService not gets started by SyncManager on Device i dont know , and i explicitly call requestSync flow is not going inside onPerformSync.? thanks On Jan 31, 1:49 pm, Dmitri Plotnikov dplotni...@google.com wrote: Sending requestSync to contentresolver

Re: [android-developers] Re: Questions about Two Way Sync Using SyncAdapter and SyncService in android

2011-01-31 Thread Dmitri Plotnikov
Do you see your account in Settings/Accounts? Does it have contact syncing enabled? On Mon, Jan 31, 2011 at 2:44 PM, himanshu jain himanshu@gmail.comwrote: @Dmitri thanks once again But why my SyncService not gets started by SyncManager on Device i dont know , and i explicitly call

[android-developers] Re: Questions about Two Way Sync Using SyncAdapter and SyncService in android

2011-01-31 Thread himanshu jain
@Dmitri Yes i created my account when i go to Account sync section through settings and after adding my account , sync gets enabled in DDMS i can see SyncManager gets called twice once on setIsSyncable and on setSyncAutomatically but My Service associated with SyncAdapter does not gets started

Re: [android-developers] Re: Questions about Two Way Sync Using SyncAdapter and SyncService in android

2011-01-31 Thread Dmitri Plotnikov
I would double-check every line of AndroidManifest.xml, compare it with the one in SampleSyncAdapter to see if anything's missing. On Mon, Jan 31, 2011 at 4:26 PM, himanshu jain himanshu@gmail.comwrote: @Dmitri Yes i created my account when i go to Account sync section through settings

[android-developers] Re: Questions about Two Way Sync Using SyncAdapter and SyncService in android

2011-01-31 Thread himanshu jain
this is my manifest file manifest xmlns:android=http://schemas.android.com/apk/res/android; package=org.c99.SyncProviderDemo android:versionCode=1 android:versionName=1.0 uses-permission android:name=android.permission.GET_ACCOUNTS / uses-permission

Re: [android-developers] Re: Questions about Two Way Sync Using SyncAdapter and SyncService in android

2011-01-31 Thread Dmitri Plotnikov
I cannot spot anything obviously wrong here. Here's what I would do in this situation: Plan A: Closely examine the logs - there might be something there already. Enable more logging and see if you can glean anything from it: adb shell setprop log.tag.SyncManager VERBOSE Plan B: I would put