Chapter 8: Aligned SharedPreference example with template