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?.
thanks Dmitri On Feb 3, 1:07 pm, himanshu jain <[email protected]> wrote: > 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 authenticator associated with > that properly defined in the manifest. > > can you tell me what could be the issue ??. > > thanks > > On Feb 1, 1:51 pm, Dmitri Plotnikov <[email protected]> wrote: > > > > > > > > > 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 > > <[email protected]>wrote: > > > > 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): [SyncManager.java: > > > 607:scheduleSync()] scheduleSync: sync of Account {name=username, > > > type=com.example.android.samplesync}, com.android.contacts is not > > > allowed, dropping request > > > 01-31 21:02:06.165: VERBOSE/SyncManager(206): [SyncStorageEngine.java: > > > 374:reportChange()] reportChange 1 to: [android.content.SyncManager > > > $7@313452f8, android.content.ContentResolver$1@314960c8] > > > 01-31 21:02:06.175: VERBOSE/SyncManager(206): [SyncManager.java: > > > 653:sendCheckAlarmsMessage()] sending MESSAGE_CHECK_ALARMS > > > 01-31 21:02:06.235: VERBOSE/SyncManager(206): [SyncManager.java: > > > 614:scheduleSync()] scheduleSync: delay 0, source 0, account Account > > > {name=username, type=com.example.android.samplesync}, authority > > > com.android.contacts, extras Bundle[{}] > > > 01-31 21:02:06.235: VERBOSE/SyncManager(206): [SyncManager.java: > > > 786:scheduleSyncOperation()] scheduleSyncOperation: dropping duplicate > > > sync operation authority: com.android.contacts account: Account > > > {name=username, type=com.example.android.samplesync} extras: [] > > > syncSource: 0 when: 319845221 expedited: false > > > 01-31 21:02:06.235: VERBOSE/SyncManager(206): [SyncStorageEngine.java: > > > 374:reportChange()] reportChange 1 to: [android.content.SyncManager > > > $7@313452f8, android.content.ContentResolver$1@314960c8] > > > 01-31 21:02:06.255: VERBOSE/SyncManager(206): [SyncManager.java: > > > 653:sendCheckAlarmsMessage()] sending MESSAGE_CHECK_ALARMS > > > 01-31 21:02:06.325: VERBOSE/SyncManager(206): [SyncManager.java: > > > 614:scheduleSync()] scheduleSync: delay 0, source 2, account Account > > > {name=Backup Assistant, type=com.fusionone.account}, authority > > > com.android.contacts, extras Bundle[{}] > > > 01-31 21:02:06.335: VERBOSE/SyncManager(206): [SyncManager.java: > > > 786:scheduleSyncOperation()] scheduleSyncOperation: dropping duplicate > > > sync operation authority: com.android.contacts account: Account > > > {name=Backup Assistant, type=com.fusionone.account} extras: [] > > > syncSource: 2 when: 319845328 expedited: false > > > 01-31 21:02:06.385: VERBOSE/SyncManager(206): [SyncManager.java: > > > 614:scheduleSync()] scheduleSync: delay 0, source 2, account Account > > > {name=username, type=com.example.android.samplesync}, authority > > > com.android.contacts, extras Bundle[{}] > > > 01-31 21:02:06.395: VERBOSE/SyncManager(206): [SyncManager.java: > > > 786:scheduleSyncOperation()] scheduleSyncOperation: dropping duplicate > > > sync operation authority: com.android.contacts account: Account > > > {name=username, type=com.example.android.samplesync} extras: [] > > > syncSource: 2 when: 319845375 expedited: false > > > 01-31 21:02:06.425: VERBOSE/SyncManager(206): [SyncManager.java: > > > 786:scheduleSyncOperation()] scheduleSyncOperation: dropping duplicate > > > sync operation authority: com.android.contacts account: Account > > > {name=username, type=com.example.android.samplesync} extras: [] > > > syncSource: 4 when: 319845416 expedited: false > > > 01-31 21:02:06.425: VERBOSE/SyncManager(206): [SyncManager.java: > > > 1473:handleMessage()] handleSyncHandlerMessage: MESSAGE_CHECK_ALARMS > > > 01-31 21:02:06.425: VERBOSE/SyncManager(206): [SyncManager.java: > > > 1473:handleMessage()] handleSyncHandlerMessage: MESSAGE_CHECK_ALARMS > > > 01-31 21:02:06.435: VERBOSE/SyncManager(206): [SyncManager.java: > > > 1473:handleMessage()] handleSyncHandlerMessage: MESSAGE_CHECK_ALARMS > > > > On Jan 31, 6:00 pm, Dmitri Plotnikov <[email protected]> wrote: > > > > 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 aside the sync adapter that you wrote, take > > > > SampleSyncAdapter, make sure it works on the device, and then start > > > morphing > > > > it into what you need, making small incremental changes and retesting > > > until > > > > it stops working. Then you know where you made a mistake. > > > > > Plan C: I would get Android source and step through it in the debugger. > > > > SyncManager is a complicated class, so it will take you a few minutes > > > > to > > > > figure out. But in the end it's just Java. If you can write Java, you > > > can > > > > read Java. > > > > > I hope this helps, > > > > - Dmitri > > > > > On Mon, Jan 31, 2011 at 5:19 PM, himanshu jain <[email protected] > > > >wrote: > > > > > > 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 > > > > > android:name="android.permission.USE_CREDENTIALS" /> > > > > > <uses-permission > > > > > android:name="android.permission.MANAGE_ACCOUNTS" /> > > > > > <uses-permission > > > > > android:name="android.permission.AUTHENTICATE_ACCOUNTS" /> > > > > > <uses-permission > > > > > android:name="android.permission.INTERNET" /> > > > > > <uses-permission > > > > > android:name="android.permission.WRITE_SETTINGS" /> > > > > > <uses-permission > > > > > android:name="android.permission.WRITE_SECURE_SETTINGS" /> > > > > > <uses-permission > > > > > android:name="android.permission.READ_CONTACTS" /> > > > > > <uses-permission > > > > > android:name="android.permission.WRITE_CONTACTS" /> > > > > > <uses-permission > > > > > android:name="android.permission.READ_SYNC_STATS" /> > > > > > <uses-permission > > > > > android:name="android.permission.READ_SYNC_SETTINGS" /> > > > > > <uses-permission > > > > > android:name="android.permission.WRITE_SYNC_SETTINGS" /> > > > > > > <application android:icon="@drawable/icon" android:label="@string/ > > > > > app_name"> > > > > > <activity android:name=".LoginActivity" > > > > > android:label="@string/app_name"> > > > > > <intent-filter> > > > > > <action android:name="android.intent.action.VIEW" /> > > > > > </intent-filter> > > > > > </activity> > > > > > <activity android:name=".ProfileActivity" > > > > > android:label="Profile"> > > > > > <intent-filter> > > > > > <action > > > > > android:name="android.intent.action.VIEW" /> > > > > > <category > > > > > android:name="android.intent.category.DEFAULT" /> > > > > > <data > > > > > android:mimeType="vnd.android.cursor.item/ > > > > > vnd.org.c99.SyncProviderDemo.profile" /> > > > > > </intent-filter> > > > > > </activity> > > > > > <service android:name=".AccountAuthenticatorService" > > > > > android:exported="true"> > > > > > <intent-filter> > > > > > <action > > > > > android:name="android.accounts.AccountAuthenticator" /> > > > > > </intent-filter> > > > > > <meta-data > > > > > android:name="android.accounts.AccountAuthenticator" > > > > > android:resource="@xml/authenticator" > > > > > /> > > > > > </service> > > > > > <service android:name=".ContactsSyncAdapterService" > > > > > android:exported="true" > > > > > > <intent-filter> > > > > > <action > > > > > android:name="android.content.SyncAdapter" /> > > > > > </intent-filter> > > > > > <meta-data > > > > > android:name="android.content.SyncAdapter" > > > > > android:resource="@xml/syncadapter" /> > > > > > <meta-data > > > > > android:name="android.provider.CONTACTS_STRUCTURE" > > > > > android:resource="@xml/contacts" /> > > > > > </service> > > > > > > </application> > > > > > <uses-sdk android:minSdkVersion="5" /> > > > > > > </manifest> > > > > > > thanks > > > > > > On Jan 31, 4:53 pm, Dmitri Plotnikov <[email protected]> wrote: > > > > > > I would... > > read more » -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

