SyntaxFix
Write A Post
Hire A Developer
Questions
I believe that was already answered here.
String versionName = getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
OR
int versionCode = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode;