title: Shared Preference not working across two activities?
body: <p><strong>Writing preference from file Login.java:</strong></p>
  
  <pre><code>SharedPreferences sp = PreferenceManager
                              .getDefaultSharedPreferences(Login.this);
                      SharedPreferences.Editor edit = sp.edit();
                      edit.putString("username", username);
                      edit.commit();
  </code></pre>
  
  <p><strong>Loading preference in UpdateList.java:</strong></p>
  
  <pre><code>SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(UpdateList.this);
             String post_username = sp.getString("username", "anon");
  </code></pre>
  
  <p>I want to pass this shared preference to a php file through json, but it is not able to save the preference across two activities</p>