Pseudocode for SharedPrefs for Message API