android - MODE_MULTI_PROCESS I am studying SharedPreferences, can anyone explain me what it does? -


i studying sharedpreference , didn't understand this:

mode_multi_process

this method check modification of preferences if sharedpreference instance has been loaded.

can 1 please explain me example?

this behavior desired in cases application has multiple processes, writing same sharedpreferences file. there better forms of communication between processes, though.

mode_multi_process used when application has multiple processes, of them writing same sharedpref file. , app having multiple processes rare thing in itself. shouldn't anyway use mode_multi_process sharedprefs.

quoting reason documentation,

mode_multi_process not work reliably in versions of android, , furthermore not provide mechanism reconciling concurrent modifications across processes. applications should not attempt use it. instead, should use explicit cross-process data management approach such contentprovider

moreover, mode deprecated in api level 23


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -