Simple question, though I couldn’t find anything related on SO.
I’m developing an android game and just added the score. Each game level is one activity, and each completed level adds an amount of score to the total. I would like to forbid game level activity from starting again after that level is completed, to prevent users from adding score over same level again.
I apologize for my poor english. Hopefully, I made myself understood.
Thank you in advance.
You can use sharedpreferences to save a variable that will persist as long as your app is installed.
I would save a number this way, telling you what level the player has reached/completed.
You can read more here on the android developer site