title: Understanding Xamarin Essentials Preferences
body: <p>I have a Xamarin Forms application that is currently only targeting the Android platform. For this application, I need to store some application settings. For this, I have looked at the preferences capability of the Xamarin Essentials library.</p>
  <p>After reading the documentation (<a href="https://docs.microsoft.com/en-us/xamarin/essentials/preferences?context=xamarin%2Fxamarin-forms&amp;tabs=android" rel="nofollow noreferrer">here</a>), there are a couple of things that I do not understand.</p>
  <p>First, the section titled &quot;Platform Implementation Specifics&quot; (for Android) states the following:</p>
  <blockquote>
  <p>All data is stored into Shared Preferences. If no sharedName is
  specified the default shared preferences are used, else the name is
  used to get a private shared preferences with the specified name.</p>
  </blockquote>
  <p>Following the link in this section, it seems that there are couple of different ways to get preferences (shared or not?). However, looking at the API for the Xamarin Essentials library, I do not see how this is done / understand the concept. Can someone elaborate on this?</p>
  <p>Second, from reading the section titled &quot;Integrate with System Settings&quot;, it sounds like you have the option to tie preferences into system settings. To me, this sounds like I can change a preference setting without actually being inside of the application (from the Settings <em>widget</em>). Is this correct? If so, how can I set this up from Xamarin Forms? Following the link it appears that I would need to define a settings screen. I am not sure what is required / where to place everything. Can someone elaborate on this? Can someone point me to a code sample?</p>