title: Android: Call Function on Appear
body: <p>I have an app that needs to do something every time it is brought up on screen. In my onCreate function, the app checks the user's settings and performs an action. In some cases, the user will need to change their settings in order to proceed. How do I make the app call the onCreate function again once the user returns to the app? Or better yet, what function is called when a view appears? Thank you!</p>
  
  <p><strong>This is how I am navigating away from my app (via a button):</strong></p>
  
  <pre><code>if(!networkEnabled){
  
  AlertDialog alertDialog = new AlertDialog.Builder(Main.this).create();
  alertDialog.setTitle("Network Location Required");
  alertDialog.setMessage("Please enable your network location settings to use the app");
  alertDialog.setButton("Open", new DialogInterface.OnClickListener() {
  
  public void onClick(DialogInterface dialog, int which) {
  
  Intent dialogIntent = new Intent(android.provider.Settings.ACTION_SECURITY_SETTINGS);
  dialogIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  startActivity(dialogIntent);
  }
  });
  alertDialog.show();
  }
  </code></pre>
  
  <p><strong>And then I am using onStart like this:</strong></p>
  
  <pre><code>public void onStart(Bundle savedInstanceState) {
  super.onStart();
  </code></pre>