Question

I have read every amount of detail on syncadapters that exists and I understand how it is meant to work, but I cannot find any information on if it is possible to NOT let the user unsync the data.

For example if I use the syncadapter to sync all of my data for my application with the server, obviously I would not want the user to be able to check "Don't sync data" from the accounts screen, so I want to know if there is a way to sync all of this data with the sync adapter either by not having the option to check the box to unsync, or by creating a hidden sync account that the user cannot modify.

If using the sync adapter is the wrong context for this case I would appreciate some examples of better ways to implement what I need or a heading in the right direction. I think using the syncadapter MAY be wrong and I may have to implement my own custom service, I just need a example or something to get me headed in the right direction.

Thank you for your help.

Was it helpful?

Solution

I found the solution, there is a tag you can specify in the xml layout

android:userVisible="false"

this allows the user to not have the option to uncheck syncing. Althought there is still a bug in 2.3.3 that says the service is not syncing, even though it IS syncing. Most likely because the user is not selecting a checkbox.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top