Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When would we want a non-persistent Preference?

I'm trying to wrap my head around persistency when it comes to Android preferences. There's an attribute persistent, which can be either true or false. If true, the preference is committed to shared preferences. How can a preference be used if it's not persistent?

like image 562
kaerimasu Avatar asked Aug 01 '11 16:08

kaerimasu


People also ask

What is the difference between persistence and Nonpersistence storage?

Persistence is a property of a an individual message. The main difference is that if you are using persistent delivery, messages are persisted to disk/database so that they will survive a broker restart. When using non-persistent delivery, if you kill a broker then you will lose all in-transit messages.

What is non persistent data?

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.


1 Answers

You could (ab-)use Preferences as menu items (make them clickable to launch some other action) or to display some info, e.g. application version etc.

In this case, you don't want them to be stored in the xml file.

like image 115
sstn Avatar answered Oct 10 '22 16:10

sstn