How can i get the versionCode to use with update function?


#1

I saw the ngCordova plugin ,But it only return versionName.
Is anyway to return versionCode that is simple to compare?
If not ,the only way to compare version to check update is compare versionName by char?


#2

Well the version in your config.xml should be something like version="0.9.2", so cordova.getAppVersion will return “0.9.2”. This is not really a version name, it’s a string but you can easily compare it with another appVersion to see whats the newer version.

Or is your problem that you have a name for the version in your config.xml? In that case you can only compare it by chars. The ngCordova wrapper just returns exactly that string. Do you think it should return another version code anywhere specified?


#3

I dev on android,so android apk always privoid versionCode.


#4

Pulled up a new question here which is related to this.

Cant solve it help is needed.