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

Updated 9 October 2021

Save

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
author
. . .

Leave a Comment

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


8 comments

  • Arpana K.C.
    • Vedesh Kumar
  • Shailesh Vishwase
    • Mobikul Mobikul
  • vuanhlevis
    • Vedesh Kumar (Moderator)
  • kavi
    • anchit (Moderator)
  • Start a Project


      Message Sent!

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

      Back to Home