I have an AccountAuthenticator and associated Sync开发者_如何学JAVAService that are working when I test via Dev Tools -> Sync Tester on the emulator. I also have a preferences intent working on the Account screen.
However, I have been unable to figure out how to get my Sync Service listed under the "Data & Synchronization" area on the account page. (There's a screenshot of this area at the bottom of: http://www.c99.org/2010/01/23/writing-an-android-sync-provider-part-1/ )
So, for instance, if it were Contacts I were syncing, I would expect to be able to put a "Sync Contacts" checkbox there. How do I achieve this for my custom data model/sync service?
Turns out I needed to call:
ContentResolver.setIsSyncable(account, "authority.here", 1)
精彩评论