title: Android Wait for user input at AlertDialog to proceed
body: <p>I've see this subject been discussed here but can't seem to understand how to proceed.</p>
  
  <p>In my <code>onCreate</code> I have code that checks if it is the first run of the application <code>firstRun = getPref.getBoolean("firstRun", true);</code>. If its the first time that the app is run, an alertdialog is shown with a message saying thats there is no database installed and the user as to press the <code>OK</code> button to download the database. If there are no errors than <code>pref.putBoolean("firstRun", false);</code> and the alertdialog it's not shown in the next runs.</p>
  
  <p>Now I want to introduce a <code>ChangeLog</code> that it is only shown on the first run after the app is installed or upgraded. Since the changelog must come before the <code>firstRun</code> check, I should wait for the user press the changelog alertdialog <code>OK</code> button.</p>
  
  <p>I've created the code for the changelog (it's working as expected) and after that code, I have the code of the <code>firstRun</code>. The problem is that the changelog is shown but than, if its in fact the first run of the app, the <code>firstRun</code> alertdialog is overlapping the changelog alertdialog.</p>
  
  <p>So, here is my question.</p>
  
  <p>What's the best wait to proceed so that the <code>firstRun</code> code is only executed after the user presses the <code>OK</code> button on the changelog alertdialog?</p>