How can I get the build number of my Android app and setText to a textview?
For example, "Build # 91".
How can I get the build number of my Android app and setText to a textview?
For example, "Build # 91".
Simple and short way: implement into your activity
String versionName = getApplicationContext().getPackageManager()
.getPackageInfo(getApplicationContext().getPackageName(), 0).versionName;
TextView tv=(TextView)findViewById(R.id.tv);
tv.setText(versionName);