Closed SetiaBudy-Mail closed 6 years ago
i'm getting the same issue of unable to check app version, it always returns 0.0.0.0 and false on isUpdateAvailable
I am also having same issue here, it always returns 0.0.0.0 and false on isUpdateAvailable
Thank you for letting me know. I'm looking into it.
The Google Play code has stopped reflect the field softwareVersion
Same here
@javiersantos maybe the structure of the html page has changed?
Google indeed updated the Google Play website. What we do in this library is HTML scraping. Since Google does not provide a stable API for this purpose, that's the only option we have. Unfortunately HTML scraping is fatally sensitive to any changes in Play Store website. To make it worse it's entirely possible that Google does staged rollout, some user's (countries of origin, last digit of their IP address, whatever) may get a different version of the web than others. I personally decided to step back from using this library to notify users about new versions of my apps.
I am also having same issue here
@javiersantos same Issue Occurred. Update Dialog not pop Up.
@javiersantos This issue can be solved by reading the tag with the htlgb class in the Play Store HTML
<span class="htlgb"><div><span class="htlgb">2.1</span></div></span>
@supersume the css class htlgb
is used in much more places in that html. We'd need to include Current Version
in the pattern and that is localized so we need to fetch the en version of the html to parse for the version name, then localized version for what's new. What if the app is for a local market, ie not available for en speaking countries, no english app listing either? I also guess that class name is generated by whatever css tool google engineering is using. That means it can change at any time without adv notice.
here is log i can show in my IDE.
Code setup : i have added it on MainActivity onCreate method.
AppUpdater appUpdater = new AppUpdater(this); appUpdater.start();
@javiersantos have you solved this problem?
@javiersantos getting the same error.
E/AppUpdater: Cannot retrieve latest version. Is it configured properly?
anyone? i'm getting the same error
I think it has not been updated yet after google changed their html source.
Still facing the same issue. Is it resolved? if (yes){ "Do I need to update dependency"} else{ "Till when it will be resolved?"}
HI @javiersantos I can get Latest Version Using Jsoup.
is this parameter used by you in this lib?
newVersion = Jsoup.connect("https://play.google.com/store/apps/details?id=com.otto.excellence&hl=it")
.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(".hAyfc .htlgb")**
.get(7)
.ownText();
return newVersion;
Let me know your thought on same.
Thanks
waiting
At least give us the timeline, till when the issue will be resolved. Or should we look for other libraries.
Hi All, if you want alternate way to get play store App Version
compile 'org.jsoup:jsoup:1.8.3'
private class GetVersionCode extends AsyncTask<Void, String, String> {
@Override
protected String doInBackground(Void... voids) {
String newVersion = null;
try {
newVersion = Jsoup.connect("https://play.google.com/store/apps/details?id=com.otto.excellence&hl=it")
.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(".hAyfc .htlgb")
.get(7)
.ownText();
return newVersion;
} catch (Exception e) {
Log.e("Exception", e.getMessage());
return newVersion;
}
}
@Override
protected void onPostExecute(String onlineVersion) {
super.onPostExecute(onlineVersion);
Log.d("update", "playstore version " + onlineVersion);
}
}
@kushanshah11 D/update: playstore version 5.0 and up
@serrokitskiy i dont understand...
@kushanshah11 Log.d("update", "playstore version " + onlineVersion); return D/update: playstore version 5.0 and up
not version of application
@serrokitskiy i have checked with same code and i get correct result. here i attached snap so you have better idea.
or you can send me link of playstore app for which you are testing so i can investigate for same.
Thanks in advance.
@serrokitskiy just update
.get(5)
and you will get your version code.
@kushanshah11 ok, thk
@serrokitskiy let me know once done
I changed my code using JSON mode. https://github.com/javiersantos/AppUpdater/wiki/UpdateFrom.JSON It's work for me
Same problem
I create a feature request to google, hope developer can get official support https://issuetracker.google.com/issues/111101725
Hi guys. I want to clarify that there is no definitive solution to the problem, since Google Play does not provide an API to obtain the latest version.
I will work on a temporary solution that will solve the problem. Please, I advise you to use an alternative and more reliable method (such as JSON or XML).
Update 2.7 is now available with the workaround based on Jsoup. Please note that this is a temporary solution and the Google Play website may change at any time.
I couldnt understand how to use it properly. should I use it in activity.xml or activity.java
PS: Sorry I am new to this
Details
2.6.5
5.0.2
LG
G2
Builder
Problem
Hi.. I want to ask, why I always get return Latest Version 0.0.0.0 while in the playstore has its version 1.0.0 thanks.
Expected Result
Latest Version 1.0.0 Release notes URL https://play.google.com/store/apps/details?id=com.vcard.sg&hl=en Is update available?true
Actual Result
Latest Version 0.0.0.0 Release notes URL https://play.google.com/store/apps/details?id=com.vcard.sg&hl=en Is update available?false