title: Get SharedPreferences value from another activity
body: <p>How to I read SharedPreferences value from another activity?</p>
  
  <p>I have got setting.calss when i choose which activity start first it works great...</p>
  
  <p>how to i read Preferences from other activities? </p>
  
  <pre><code>    final SharedPreferences settings = getPreferences(MODE_PRIVATE);
      int choice = settings.getInt("language", -1);
  </code></pre>
  
  <p>Open Dialog 3 activities:</p>
  
  <pre><code>    String[] activities = { "Activity 1", "Activity 2", "Activity 3" };
  </code></pre>
  
  <p>OnClick:</p>
  
  <pre><code>            @Override
              public void onClick(DialogInterface dialog, int which) {
                  SharedPreferences.Editor editor = settings.edit();
                  editor.putInt("language", which);
                  editor.commit();
                  launchActivity(which);
              }
              }).show();
      } else {
          // start the activity and close this activity
          launchActivity(choice);
      }
  }
  </code></pre>