John
John

Reputation: 1717

Using content providers/loaders on API Calls with no database changes

I am creating an application that does not store any data (other than basic user name, password, etc). It uses API calls to get data and displays them when loaded through Volley.

I know typically it is best practice to use content providers and loaders when you store things in SQLite. My question is: should I still be using content providers and loaders given that my app does not utilize a database. Does anyone have any best practices/tutorials on how to do so with Volley?

Thanks!

Upvotes: 2

Views: 478

Answers (1)

GPuschka
GPuschka

Reputation: 522

It depends on your use cases. But here, no there is no need. There are other callback mechanisms you can use like broadcasts, async tasks, handlers or even content observers. There is a nice official tutorial of how to communicate with the UIThread aka. the visible stuff from some background logic.

Also if you want to you also can use loaders without any content provider. See this so post for more informations.

Upvotes: 1

Related Questions