onPause()
should be used to save persistent
data and onSaveInstanceState(Bundle)
is typically used to save non-persistent
data.What does that mean?What is difference between persistent and non-persistent data?
Persistence data:
The data which is available after fully closing the application.
This type of data must be save into shared preference or database or internal or external memory
Non- persistence data:
The data which is not available after fully closing the application. we can say that non - persistence data mean volatile data that available during the execution of the application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With