Reputation: 8405
I have the auto sync running if I select the checkbox through the Setting/Account screen. If I set the UserVisible in the syncadapter.xml to false, I can't select the check box. How to start the auto sync without the option in setting screen.
Upvotes: 1
Views: 449
Reputation: 74209
To manually invoke a sync you call RequestSync
with at least the Account and Authority string that you have already created for your SyncAdapter
.
ContentResolver.RequestSync(account, authority, null);
That will have OS start your registered sync Service
and thus your SyncAdapter
.
Upvotes: 1