4

I have recently made a change to an existing app and we would like to push out the changes to our users as a downloadable update.

The application recognizes that there is an update, and downloads the file. After the download, we can click on the apk file and it says that it will replace an existing application. We click OK, then click Install and get a message simply saying "Application Not Installed."

We would like this to be a rather seamless transition to the new update as we have ~1000 users that will need this update for our company to run smoothly.

Both applications (old version and new version) are signed APK's with the same certificate. Having each user uninstall manually then install the new version is not an option as we have given them limited access to their phone features.

ethan
  • 780
  • 7
  • 20
jakewp11
  • 450
  • 4
  • 11
  • Have you tried a refresh install your latest build apk, does it install properly? – yorkw Dec 01 '11 at 21:00
  • 1
    Yes. I am able to install version 42, and 43 individually without any errors. But installing 42, then trying to "upgrade" that to 43 is where I am having issues. – jakewp11 Dec 01 '11 at 21:16
  • I'm able to install 42, uninstall, then install 43. But that is not how we want it to be done – jakewp11 Dec 01 '11 at 21:17
  • According to your description, your app detect available upgrade by itself, download upgrade, and prompt user click downloaded apk file to upgrade/replace the existing app, to make it more clear, you are not using Android Market manage application publish/upgrade, rignt? – yorkw Dec 01 '11 at 21:38
  • That is mostly correct. It will prompt them to download the APK file. They then have to go to downloads and choose to open and install the file. We are not doing this through the market, just through our server. – jakewp11 Dec 01 '11 at 21:46
  • Try connect your phone (in debug mode) to DDMS, do exactly what you suppose to do and check out the logcat to see if you can get more error details than "Application Not Installed". – yorkw Dec 01 '11 at 21:58

1 Answers1

3

Hard to be definitive without seeing logs and/or manifest files, but some quick things to look for:

In the AndroidManifest.xml file, check to make sure:

  1. The package name is exactly the same in each version
  2. the versionCode is an integer that is greater than that of the previous version
  3. The versionName is different for each version

    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="XXXXX" android:versionCode="2" android:versionName="2.1.0 Fred">

Mike Fahy
  • 5,487
  • 4
  • 24
  • 28
  • We had it at versionCode = "3.0" (for both versions) and versionName = "42" and "43" for the old and new one respectively. So you're saying we need to change versionCode to something like 3.1 or 4.0 for versionName 43? – jakewp11 Dec 01 '11 at 20:21
  • VersionCode should actually be an integer (ie, 4), as this is what the system uses to determine the succession of each release. VersionName is usually a decimal number, more akin to an internal release number. – Mike Fahy Dec 01 '11 at 20:38
  • That did it! We were running into some issues with the way our server was distributing it. There was an older version out there with 3.0 that it was still finding. – jakewp11 Dec 02 '11 at 17:39
  • Glad to hear it; I was going to be stumped, otherwise. Thanks! – Mike Fahy Dec 02 '11 at 17:49
  • @VeryVito If I added a splash activity to open before the mainactivity does it do the same error ?? or if I added to the main activity "android:theme="@android:style/Theme.NoTitleBar.Fullscreen"" ?? because I have the package name exactly the same, the version code is an integer greater than the previous one and the versionName is different .. Thanks for your help – Chris Sim Jun 25 '14 at 08:33
  • this one is so great. – salih Dec 21 '17 at 11:17