SDS IAM & EMM
There are 2 requirements for updating custom apps to newer versions:
- The package name of the updated APK needs to be the same as the current version.
- The version code needs to be greater than that current version.
According to the guide from Android regarding the manifest elements,
versionCode is the actual field that is used by internally to determine whether a version is newer of older than the other.
versionName is for human reading only:
An internal version number. This number is used only to determine whether one version is more recent than another, with higher numbers indicating more recent versions. This is not the version number shown to users; that number is set by the versionName attribute.
The value must be set as an integer, such as '100'. You can define it however you want, as long as each successive version has a higher number. For example, it could be a build number. Or you could translate a version number in 'x.y' format to an integer by encoding the 'x' and 'y' separately in the lower and upper 16 bits. Or you could simply increase the number by one each time a new version is released.
The version number shown to users. This attribute can be set as a raw string or as a reference to a string resource. The string has no other purpose than to be displayed to users. The versionCode attribute holds the significant version number used internally.
NOTE — The updated APK needs to be signed with the same signature as the current version. To verify that your APK is using the same certification as the previous version, you can run the following command on both APKs and compare the results:
$ jarsigner -verify -verbose -certs my_application.apk
If the results are identical, you’re using the same key and are ready to continue. If the results are different, you will need to re-sign the APK with the correct key.