如何获取Play商店的应用版本 [英] How get the app version on the play store
本文介绍了如何获取Play商店的应用版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要知道,向用户显示提供更新的消息,如果它是必要。我可以得到我安装版本的应用程序版本(使用cordova-plugin-app-version):
cordova。 getAppVersion.getVersionNumber(function(version){
console.log(la version de la app es+ version);
$ scope.versi = version;
}) ;
但不是Android商店应用程序版本。
解决方案
我在一年前找到了解决方案。我现在找不到链接,但有它:
字符串newVersion = Jsoup
.connect(
https://play.google.com/store/apps/details?id=
+套餐+& hl = en)
.timeout(30000)
.userAgent(
Mozilla / 5.0(Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6)Gecko / 20070725 Firefox / 2.0.0.6)
.referrer(http:/ /www.google.com)。get()
.select(div [itemprop = softwareVersion])。first()
.ownText();
I want to know the app version on the android store for my app.
I need to know that to show to the user a message offering an update if it's necessary. I can get the app version of my installed version (using a cordova-plugin-app-version) like that:
cordova.getAppVersion.getVersionNumber(function (version) {
console.log("la version de la app es " + version);
$scope.versi = version;
});
but not the android store app version.
解决方案
I found solution here about year ago. I cannot find a link now but there is it:
String newVersion = Jsoup
.connect(
"https://play.google.com/store/apps/details?id="
+ "Package" + "&hl=en")
.timeout(30000)
.userAgent(
"Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6")
.referrer("http://www.google.com").get()
.select("div[itemprop=softwareVersion]").first()
.ownText();
Require Jsoup library. here is the link of details answare link
这篇关于如何获取Play商店的应用版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文