title: Storing settings in Android multi-user app
body: <p>What is the best way to store user settings in Android app which is multi-user?</p>
  
  <p>Now I'm using</p>
  
  <pre><code>SharedPreferences sharedPref = PreferenceManager
   .getDefaultSharedPreferences(getActivity().getBaseContext());
  String uid = sharedPref.getString("prompt-on-close", "N/A");
  </code></pre>
  
  <p>I think this won't work for me as this would mean, all users would share the same settings (if user signs out and another signs in the values remains the same).</p>
  
  <p>I discovered an alternative:</p>
  
  <pre><code>SharedPreferences sharedPref = getActivity().getSharedPreferences("user1", Context.MODE_PRIVATE);
  </code></pre>
  
  <p>I'm still not sure if this is prefarable solution and more important, if standard Prefrences dialogs can uset it. I think it uses the default settings only.</p>