title: How to safely finish an Activity in the onResume() method?
body: <p>My activity's onResume() reads off some "extras" data from the Intent that started it and updates the UI accordingly.</p>
  
  <p>I'd like to add error handling: if the data in the Intent is missing/corrupted, the activity displays a Toast and finishes.</p>
  
  <p><strong>Can I simply call finish() in the onResume() method?</strong> I'm worried about some unexpected things given that both are related to the life cycle.</p>
  
  <p>If there are other better ways, I'm interested in these too, but the above seems simplest.</p>
  
  <p>Thanks!</p>