Getting the android binary's versionCode

Is there any way to find the base android version code? Scenario:

I deployed version code 20 to the play store. I made some fixes, and it requires a new standalone app to be built (enable branch, fb, etc), so I increment the version code to 21 and build+publish. Since I did not update the expo sdk version, apps in the wild will pick up the new manifest.

Now, when I query, I will get 21, instead of the “real” version code of the binary, which is 20. Is there an API that exposes the 20? If not, is my only solution to push a new release channel (say, prod-20 vs prod-21) that is android-specific?


1 Like

There’s not a way to do it right now, but just added this for the next SDK:

Thanks! It looks like the android Constants.systemVersion is missing from the docs (it only mentions an ios one under Constants.platform.systemVersion) -

Also, is there a similar thing for iOS? Adding a manifest.ios.associatedDomains declaration will have similar effects on the binary (it updates the entitlements file) and affects applinks, branch, etc.

Hm ok I’m not sure what’s going on with systemVersion. Will take a look at that.

Good point, I’ll make a ticket for Ben on the iOS side.

Hi @jesse

As of SDK25, maybe this canny request can be closed now? unless you plan to add extra datas.

It looks like there are a few more fields such as getSerialNumber, getIPAddress, getMACAddress that we don’t support yet so I’ll leave it open for now.