I need to cache an object to access it every and each Activity
and Fragment
in my app.
I tried to make it static
, But , unfortunately, sometimes Android OS makes this static as null which crashes my app with no reason.
so is it a good practice to use SharedPreferences
with Gson
to serialize and
cache the object on the disk?