title: Shared preferences retuning as null
body: <p>I am tryting to simply check to load the correct starting activity i do:</p>
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      public static final String TAG = &quot;MainActivity&quot;;
  
     public SharedPreferences sharedPreferences =  MyApplication.getAppContext().getSharedPreferences(&quot;sharedPrefs&quot;, MODE_PRIVATE);
      public SharedPreferences.Editor editor = sharedPreferences.edit();
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          boolean onBoardingComplete = sharedPreferences.getBoolean(&quot;firstRun&quot;, true);
  
          if(onBoardingComplete){
              Intent navIntent = new Intent(this, NavigationStartActivity.class);
              startActivity(navIntent);
          }else{
              Intent onBoardIntent = new Intent(this, OnBoardingActivity.class);
              startActivity(onBoardIntent);
          }
  
  
      }
  </code></pre>
  <p>I get a null pointer exception on the initialisation of sharedPreferences effectively line 5 here. My sharedPrefs file exists in the storage data/data/com.myap/shared_prefs/sharedPrefs.xml</p>
  <p>I have no idea why this would return null.</p>