• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How can I get app version number from google play store

Hello,
How can I get app version number from google play store by using Android java code/API as I am trying to display app version in my UI page.
I tried below method with "Jsoup.connect" but it return version number as "Varies with device"
private String getVersion(String url) {
String newVersion = null;
try {
newVersion = Jsoup.connect(url + "&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(".hAyfc .htlgb")
.get(7)
.ownText();
} catch (Exception e) {
e.printStackTrace();
}
return newVersion;
}
Please let me know if there is any API available so that I can use.
And share me your ideas which are available best techniques to show APP version in my UI page.
Br,
Kabo Technologies
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones