title: Restart Activity with onResume method
body: <p>I'd like to restart an activitiy with the onResume() method. I thought i can use an Intent to achieve that, but that ends in an endless loop.</p>
  
  <pre><code>@Override
  protected void onResume() {
      Intent intent = new Intent(MainActivity.this, MainActivity.class);
      MainActivity.this.startActivity(intent);
      finish();
      super.onResume();
  }
  </code></pre>
  
  <p>Is there another way to restart an activity?</p>