How to output my versionCode from Cordova?

Without any Cordova plugins please, e.g.

There are various versions of my Android app in the wild and I’d like to output the Cordova client’s version code when reporting an exception to my server.

Is it just something glaringly obvious & simple? Thanks in advance!

Do you mean the hash that is assigned to the cordova build?

I think is this one:
__meteor_runtime_config__.autoupdateVersionCordova Is hashed using plugin


I mean the one in AndroidManifest.xml, referenced here:

Bump… should be a quick & simple one? :relaxed:

I don’t think that is actually exposed :confused:

Looking through the code:
the version is passed to an XmlBuilder and then written as the Cordova’s config.xml.

So the version isn’t stored in any other place.

You can use this cordova plugin to expose the version:

1 Like

Thanks for looking! If only I had known to include that plugin before I let the app loose in the wild…

1 Like