title: Error handling in the onCreate() method of activity android
body: <p>I am new to android development. In the overriden <code>onCreate()</code> method of my activity, I perform some operations. For ex. check if SharedPreference is already available and then route to other activity. How do I perform exception handling on this onCreate() method. Is it the right way to wrap the contents in a try catch and display the error dialog on exception?</p>
  
  <p>If the exceptions are not handled properly, in my case the onCreate() method, the app crashes with message:</p>
  
  <blockquote>
    <p>Unfortunately your application stopped working</p>
  </blockquote>
  
  <p>On searching in the internet, I found that <strong>UncaughtExceptionHandler</strong> could be used to handle it. Any sample implementation and how to call it from all my activities would be helpful. </p>