I don’t wish to use authentication with my sync adaptor Since I plan to use it for syncing twitter public timeline for a search query.
Shall I use SyncAdapter or any ordinary Service?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Either would work fine in this use case.
If your application might contain multiple user accounts, then going the SyncAdapter/Account route would be best as it would maintain the standard account management procedures (you can have accounts without authentication).
Using a SyncAdapter will also mean Android automatically syncs your data as needed.
With a standard service you’d need to set up the functionality if you wanted it to sync automatically every X minutes in the background, but apart from that it would be just as easy – though you’d need to do your syncing in a different thread (e.g. use an
AsyncTask, I think using a SyncAdapter will do this automatically).