kokoichi206 / rhythm_game

Android rhythm game
0 stars 0 forks source link

Save the experience points #36

Closed kokoichi206 closed 2 years ago

kokoichi206 commented 2 years ago

Is your feature request related to a problem? Please describe. Save the experience points

Describe the solution you'd like

Describe alternatives you've considered

Additional context Data and file storage overview (Official)

kokoichi206 commented 2 years ago

Used SharedPreferences (key value system) because there are only two or three integer.

Ref https://akira-watson.com/android/sharedpreferences.html

kokoichi206 commented 2 years ago

In order to use saved data after destroy, you have to use edit.commit() instead of edit.apply()

Ref https://try2explore.com/questions/jp/12545722

kokoichi206 commented 2 years ago

Bug related to this issue #36