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

testing - Detect whether test has failed within fixture -

android - Create single AAR file from multiple modules using Gradle -

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -