Reputation: 937
This would be more theoretical question. I created my Android library and I add it to the project as AAR (android archive). Everything works fine except one thing.
In my library, I have place where I save some data to SharedPreferences
. Depending on a boolean value, I decide in my app next time should I show the fragment from library or not.
But the case is that it looks like my app ignores saved decision to SharedPreferences
and every time I reopen app it behaves like I saved nothing in my librarys sharedPrefs.
This is first time I work with my own library so I would like to know is it possible that Android builds my lib every time from the zero, so all the data that is saves to sharedPrefs is reset?
Thanks in advance
Upvotes: 0
Views: 49
Reputation: 2250
No, it library info saved in sharedpref doesn't get reset on every time you reopen your app.
But if you are in development mode and have a configuration setting to uninstall and reinstall on every run then your sharedpref will be definitely get reset.
Upvotes: 1