Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android In Code get the Version of App?

I'm looking for the way to get the version of the app so I can display it in the About screen in my Android app.

In iOS (MonoTouch.net) we'd just do this:

NSBundle.MainBundle.ObjectForInfoDictionary ("CFBundleVersion").ToString ();
like image 397
Ian Vink Avatar asked Aug 16 '11 23:08

Ian Vink


People also ask

How do I find the version of an app on my Android?

Tap on the app info icon (i), and you'll end up in Settings. You'll be in App info for that app; tap on the Advanced dropdown menu. At the bottom, you'll see what version you are using for that app.

How do I find the version of an app?

Open the Settings app and tap Apps & Notifications. You need to go to the list of installed apps on your device. This list is found in the Settings app however, it might be under a different section depending on your version of Android. On the Apps list screen, tap the app you want to check the version number for.


1 Answers

You can use the PackageManager.GetPackageInfo method to get access to all sorts of information about your app, including VersionCode and VersionName

like image 84
Greg Shackles Avatar answered Oct 20 '22 01:10

Greg Shackles