How can I save a score in my game scene even if I close the app and open it again? I'm new to android and I only know that in Swift things like that can be saved by using user defaults but I don't what to do in Android Studio.
Here is the score I want to save:
var score = 1
later in the scene ->
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
score =+ 2 //save the score here
}