Best approach of sharing App State

I would like to know which is the best approach for sharing data between all components in android.
That could be like, the logged user. Or, some data which tells how to construct some specific layout for a client. Or, some data which should be passed along with all requests, but can be changed.

And, which would be the best approach to notify all components that something might have happened. Like, notify to all components that a user has been blocked by the server.

Hi @amadeu01,
Interesting question, what have you tried to resolve this so far?

Have you tried any of the following options?

  1. A local SQLite database
  2. Persisted data in the user (documents) space
  3. JSON from a server that specifies what is displayed and what is not

cheers,

Jayant

This topic was automatically closed after 166 days. New replies are no longer allowed.