title: Can an Android app auto-upgrade itself?
body: <p>The device my Android app is running does not have Playstore on it. The plan is to pre-install the software when shipping the device. I am now looking for a strategy to upgrade the application.</p>
  
  <p>I found this useful link to install an Android app from the apk file:</p>
  
  <p><a href="https://stackoverflow.com/questions/4967669/android-install-apk-programmatically">Android: install .apk programmatically</a></p>
  
  <p>I am thinking I will use this logic to auto-upgrade my app. I am wondering if it is even possible. I am thinking the upgrade will first try to uninstall existing version but will fail as the executable is still running and the file may be locked. Is there a better way? Regards.</p>