Hi,
In android manifest file, there is a field specifies application version. Can you please tell me if I can read that value programmically in my android code?
Thank you.
Hi,
In android manifest file, there is a field specifies application version. Can you please tell me if I can read that value programmically in my android code?
Thank you.
Call GetApplicationContext().PackageManager().getPackageInfo()
. The PackageInfo
object it returns will have what you need.
You can access to those information through the PackageInfo
class.
PackageInfo pinfo = this.getPackageManager().getPackageInfo(getPackageName(), 0);
Log.d("pinfoCode",pinfo.versionCode);
Log.d("pinfoName",pinfo.versionName);
Regards