How Do I Pull The Application Version Listed in AndroidManifest.xml From Java, android:versionName specifically?
How Do I Pull The Application Version Listed in AndroidManifest.xml From Java, android:versionName specifically?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the
PackageInfoclass. Something along the lines of:getPackageName()returns the full name of your package (the one that called it). If you were looking to find version information on a different package, you might want to wrap this in atry {...} catchblock, in case the package you were looking for wasn’t installed. There’s an example of that here.