
After evolving from a simple photo filter app, it took on many features to add a more social aspect to sharing your photos-quickly emerging as one of the top social networks among young and old alike. Nowadays, the infamous platform is a daily event in millions of people's lives. dependencies catch ( too long ago, Instagram was just your regular über-popular photo app that was only on iOS. Īdd JSOUP dependency to your module adle. Make sure you have INTERNET permission on your AndroidManifest.xml file. But if you got here and you try to cut and paste his code you'll go through the same issues I just had, so I might as well just post it here to help others like me.

Avoid this solution or be ready to patch your app whenever Google Play pages change.Īhmad Arlan's answer is the best answer so far. It works on Lollipop+ and gives you the ability to ask the user for an update with a nice dialog (FLEXIBLE) or with the mandatory full-screen message (IMMEDIATE).ĮDIT They have recently changed Google play website and now this code is broken. It could take time to be propagated (probably because of cache). Keep in mind that everybody won't see the new version in the same time.

Toast.makeText(this, "New version available on play store", Toast.LENGTH_SHORT) įor the HTML parsing part, have a look here String version = this.getPackageManager().getPackageInfo(this.getPackageName(), 0).versionName Once you find this part of the page, you can extract the version number and compare it with the one available in your app : try Once you get the page content you should parse it ( jsoup is a good solution) and search for : 2.2.0

To make the request you can use DefaultHttpClient Nevertheless, you can make an http request on the web version of the playstore ( )
