title: Shared preferences between classes (static)?
body: <p>I have two classes, one loggedIn, and a User class. In the loggedIn class I want to show the shared preferences that I made when the user logs in. </p>
  
  <pre><code>loginPrefs = getSharedPreferences("loginpreferences",Context.MODE_PRIVATE);
  SharedPreferences.Editor loginEditor = loginPrefs.edit();
  loginEditor.putString("userID", userIDCrypt);
  loginEditor.commit();
  </code></pre>
  
  <p>Now i want to make in the user class a getID() method, that I can call the method from every class with User.getID();. How can I do this?</p>
  
  <p>I need the userID in multiple classes, so I want one activity (called getID e.g.) that gives me the user ID. </p>