I’m making a game for the Android platform and I need to access some information from multiple activities (achievements, sound on/off, etc). I know I can pass individual values from one activity to another, but is there a way I can set up like a database or something where I can access the variables from any activity?
Share
It depends on your app requirement. Usually the data are shared between 2 activities via,
“Extras sent as part of the intent”
If you like to share the data across multiple activities then you could use,
1. Preference – Using application preference (XML file stored in app directory)
2. Databases – Using Android Content provider/resolver