Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Naming convention for android apps?

I've searched through stackoverflow and this doesn't seem to be a duplicate question, so please notify me if it has already been asked. I've made a second version of an app and I was wondering if there was a naming convention for the app versions. In my gradle, I've changed the values of versionCode and versionName to

versionCode 2
versionName "1.0.2"

Is this the right convention? Is there even a convention? Does versionCode have to be an integer? Is 1.02 or 1.0.02 acceptable? And does it have to be by increments of 1(i.e. can I jump straight to 1.7 on the second update)?(sorry for all the questions, I wanted to get all of it at once.)

like image 978
Luke Wang Avatar asked Aug 30 '15 05:08

Luke Wang


People also ask

How do you name Android Apps?

Go to the app > manifests > AndroidManifest. xml file and change the android:label field in your application node in AndroidManifest. xml.

What is the naming convention for Android?

Each new version of Android is named after a dessert, going in alphabetical order (Fig. 1.5).

What is naming convention and example?

A naming convention can include capitalizing an entire word to denote a constant or static variable (which is commonly done in Flash programming), or it could be a simple character limit in a coding language (such as SQL).


2 Answers

versionCode have to be integer, and it is used for android to keep track of which apk is latest, e.g. in Google Play, you can upload your apk if your new apk has versionCode larger than that of the apk you previously uploaded.

versionName is for display only, and communication with user, it is up to you to define it. I.e. no restriction

like image 139
Derek Fung Avatar answered Oct 11 '22 13:10

Derek Fung


There are no literal restrictions on either, just their data types: versionCode can be any integer and versionName can be any string.

However, Android uses the versionCode to tell which builds are more recent - and doesn't let users install an apk if the versionCode of the apk to install is less than the versionCode of the apk already installed.

Therefore version code changes should always be to larger numbers - though the how much larger is technically irrelevant.

versionName is for display purposes only. It could be set to "v1.43 - blueVersion attempt4".

A common naming conversion is to label each release version major.minor.fix in the version name, and then reflect it in the version code. e.g. v "2.3.11" becomes version code 20311. which could be followed by v"3.0.0" = code 30000.

like image 2
Moffen Avatar answered Oct 11 '22 11:10

Moffen