During which state I should save and Load one single data in an android app -


i creating simple application display quotes. want set counter gets passed api , api fetches quote. researched bit , found out can use sharedpreferences this.

however question should save , load counter. confused.

should load counter during oncreate method , save in onpause method? know can't save during ondestroy method because read ondestroy method doesn't called everytime.

can me out? first time dealing android cycles in detail.

thank you.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

python 3.x - PyQt5 - Signal : pyqtSignal no method connect -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)