Skip to content

Instantly share code, notes, and snippets.

@bholota
Created May 30, 2019 08:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bholota/d52ed925ee1e5d08aeeeba9dd067575f to your computer and use it in GitHub Desktop.
Save bholota/d52ed925ee1e5d08aeeeba9dd067575f to your computer and use it in GitHub Desktop.
Main process (PROCESS_ONE) writes only key1 and key2
PROCESS_TWO writes only key2 and key3
2019-05-30 10:20:07.163 11464-11506/com.example.sharedprefsplease D/ProcessOneIntentService: PROCESS_ONE opens prefs
2019-05-30 10:20:09.696 11464-11506/com.example.sharedprefsplease D/ProcessOneIntentService: PROCESS_ONE writes to prefs
2019-05-30 10:20:09.704 11464-11506/com.example.sharedprefsplease D/ProcessOneIntentService: PROCESS_ONE is DONE
2019-05-30 10:20:11.174 11508-11534/com.example.sharedprefsplease:PROCESS_TWO D/ProcessTwoIntentService: PROCESS_TWO writes to prefs
2019-05-30 10:20:11.182 11508-11534/com.example.sharedprefsplease:PROCESS_TWO D/ProcessTwoIntentService: PROCESS_TWO is DONE
2019-05-30 10:20:20.702 11464-11464/com.example.sharedprefsplease D/MainActivity: key1: P1, key2: P1, key3: null}
2019-05-30 10:20:30.781 11464-11464/com.example.sharedprefsplease I/Process: Sending signal. PID: 11464 SIG: 9
[App starts again]
2019-05-30 10:20:38.178 11556-11556/com.example.sharedprefsplease D/MainActivity: key1: null, key2: P2, key3: P2}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment