Taranfx
Taranfx

Reputation: 10437

Android SyncAdapter without Authentication vs. Android Service

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?

Upvotes: 4

Views: 2809

Answers (1)

Joseph Earl
Joseph Earl

Reputation: 23432

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

Upvotes: 1

Related Questions