{"id":449,"date":"2013-08-17T07:54:56","date_gmt":"2013-08-17T07:54:56","guid":{"rendered":"http:\/\/devnot.wordpress.com\/?p=449"},"modified":"2013-08-17T07:54:56","modified_gmt":"2013-08-17T07:54:56","slug":"settings","status":"publish","type":"post","link":"https:\/\/thomas-jansen.eu\/?p=449","title":{"rendered":"Settings"},"content":{"rendered":"<p>Settings can be stored using<br \/>\n<code><br \/>\nSharedPreferences settings;<br \/>\nsettings = PreferenceManager.getDefaultSharedPreferences(context);<br \/>\n<\/code><br \/>\nThis will access settings stored for the context which is typically an Activity! To share settings cross Activities use context.getApplicationContext() instead of context. This will share the data,<\/p>\n<p><code>settings = PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext());<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Settings can be stored using SharedPreferences settings; settings = PreferenceManager.getDefaultSharedPreferences(context); This will access settings stored for the context which is typically an Activity! To share settings cross Activities use context.getApplicationContext() instead of context. This will share the data, settings = PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext());<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-449","post","type-post","status-publish","format-standard","hentry","category-android-java"],"_links":{"self":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts\/449","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=449"}],"version-history":[{"count":0,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts\/449\/revisions"}],"wp:attachment":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}