I am making a Music Player in Android. Data about mp3 files is accessed from mediastore.audio.media. I have added an additonal textview field and assigned it to 0,this textview displays how many times this song has been listened. so everytime the user plays the song, the textview value is incremented by 1.
I load the data, i increment the textview, it works in all scenarios , that is oncompletion,next,previous,play,onitemclick it updates the value of the textview.
I close down my app and i restart it.after restarting in the onCreate method of main activity listview gets popluated,and the incremented values of the textview are set back to 0. that is the incrementd values are not stored.
How should i store the values and reflect it when the user restarts the app, or even after the user uninstalls the app and decides to download it back ? how should i store the incremented values ?