How to get your app’s version name from google play store


There are several situations where you may need the current version of your app from google play store to perform certain tasks like comparing it with the app version present in your device and creating an alert dialogue to update the app if the app version is lesser than play store version.

To do this you can use JSOUP library. This library actually provides a very convenient way to parse the HTML and provide you the current version of your app from play store.

To do this first, you need to add the dependency in your app level build.gradle

After adding the dependency you need to create a helper class which will be used whenever you need to get the version name from play store.

Now you are ready to get the current version of your app and to get that you need to create an object of your VersionChecker class.

As you can see in the above code variable mLatestVersionName is initialized by versionChecker.execute().get() which returns a string value which is the version name of your app from google play store.

Now you can compare this version name with your current version of the app in the device and perform the required task. Look at the code segment given below for a little help.

That all.

Thank you very much. This is Vedesh Kumar signing off.

Updated Solution –> 

Get Current Version of the Application from the playstore
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


  • Arpana K.C.
    It throws error like this:
    Could not read resource Make sure you copy resources for org.a.c.i
    • Vedesh Kumar
      Are you using proguard for shrinking?

      You can try :
      1) Disabling the proguard.
      2) add -keep class org.jsoup.** in you proguard file.

  • Shailesh Vishwase
    It gives nullPointerExeption on ownText(); please suggest me change.
  • vuanhlevis
    if version name like 2.3.5 ?
    so this line:
    Double.parseDouble(BuildConfig.VERSION_NAME) < Double.parseDouble(mLatestVersionName)
    get error ??
  • kavi
    have tried to this code for getting play store version name but have getting null value onl
  • css.php

    Excellent work, fast, good quality and understood the brief perfectly! Quick responses developing the project and very good cooperation. I suggest to anyone.

    Stathis Plakidas

    Stathis Plakidas

    Talk to Sales


    Live Chat
    Start a Project

      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home