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

node.js - How do I prevent MongoDB replica set from querying the primary? -

c# - Randomly pick a specific int from a 2D Array -

php - Angularjs http.delete is not working after deploying project on server -