I need to figure out how to get or make a build number for my Android application. I need the build number to display in the UI.
Do I have to do something with
To get the app version or build code which is used to identify the apk by its version code. Version code is used to detect the actual build configuration at the time of update, publishing, etc.
int versionCode = BuildConfig.VERSION_CODE;
Version name is used to show the users or the developers of the development sequence. You can add any kind of version name as you want
String versionName = BuildConfig.VERSION_NAME;