Android programmatically update application when a new version is available

I have the same issue but it resolved by JSOUP library.
Here is the library download link: http://jsoup.org/download

String newVersion = Jsoup
                        .connect(
                                "https://play.google.com/store/apps/details?id="
                                        + "Package Name" + "&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();

                Log.e("new Version", newVersion);

Leave a Comment