+ // Get a handle for the shared preferences.
+ SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
+
+ // Get the screenshot preferences.
+ boolean allowScreenshots = sharedPreferences.getBoolean("allow_screenshots", false);
+