VersionName as variable?

MotoMusher

Active Member
Licensed User
Longtime User
Sorry if this has been posted before. I searched and cannot find it.

I have an "About" activity which lists the version number so users can know if they have the latest version. It would be ideal if this would just use the project attribute "VersionName" so I did not have to remember to update it in 2 places and confuse users if they have the latest version.

Can this be done? (If it is the other way around that's fine)
 

MLDev

Active Member
Licensed User
Longtime User
You can get VersionName like this:
B4X:
Dim pm As PackageManager
Log("Version " & pm.GetVersionName("package name here"))

Replace package name here with your app's package name.
 
Upvote 0
Top