title: Display Dialog only on App Upgrade
body: <p>I want to verify a scenario where-in the app is upgraded to latest version and then perform an action. Consider the version of the app is 2.4 on the user's phone. He/She upgrades to the latest version (2.5) from Play Store. I will check if it is the first run after upgrade and show a dialog. (I'm using the solution given here: <a href="https://stackoverflow.com/questions/7217578/check-if-application-is-on-its-first-run">Check if application is on its first run</a> to verify first launch)</p>
  
  <p>However, how do I verify such scenario before pushing the update to Play Store. What I've tried is:</p>
  
  <ol>
  <li>Install the App from store manually</li>
  <li>Run the latest version in debug / release mode from Android Studio.</li>
  </ol>
  
  <p>But when I'm doing the above, I get the following error:
  <a href="https://i.stack.imgur.com/LLudQ.png" rel="nofollow noreferrer">INSTALL_FAILED_UPDATE_INCOMPATIBLE </a></p>
  
  <p>I've also tried installing the app from an older apk that I have, but get the same error while verifying the upgrade.</p>
  
  <p>Is there any other means by which I can verify that the dialog appears only when the user upgrades the app to the latest version ?</p>