RSS

Tag Archives: dynamic

Android: automatic set or update versionName from versionCode


In Android, version name and version code serve for different purposes, as is found in Android documentation here:

android:versionCode

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. […]

android:versionName

The version name 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.

In practice, it is often the case that the version name simply maps version code in specific ways, e.g.

2016 (version code)  –>  v2.0.1.6 (version name)

Read the rest of this entry »

Advertisements
 
Leave a comment

Posted by on June 13, 2016 in Android, Programming

 

Tags: , , , , , , , ,