开发者

Android AccountAuthenticator and Sync Service: Display under "Synchronization and Data"

开发者 https://www.devze.com 2023-02-04 04:21 出处:网络
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 Ac

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)
0

精彩评论

暂无评论...
验证码 换一张
取 消