简体   繁体   中英

Android Auto-sync with custom data

Situation: I have an account for my application that I created following the example code at http://developer.android.com/resources/samples/SampleSyncAdapter/index.html . When clicking on the account from the Account & Sync Settings screen, I see a "Sync Contacts" checkbox. When this checkbox is active, my custom sync successfully runs in the background.

Problem: I'm not syncing contacts, I'm syncing the application's custom data. I would like the checkbox to say something like "Sync Historic Data"

Question: Does anyone know where I can find some documentation on how to do this, or what steps I need to take that I can search for documentation for? Any advice or keywords to help broaden/guide my search would be appreciated as well.

Just add a custom android:label attribute to the definition of your content provider in AndroidManifest.xml.

Here is a nice basic tutorial covering the basics on the SyncAdapter.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM