turtleboy turtleboy - 4 months ago 62
Android Question

Programmatically check Play Store for app updates

I have put my app on the Google Play Store. It has been installed by lots of my company's customers. I understand the mechanism of how the app is intended to upgrade.

The users should check the auto-update check box in the playstore app for each app they want to auto-update. However some users have unchecked it or not checked it in the first place.

The app i have written is for the care industry and is used by carers to deliver homecare. Some of our customers my have 1200 carers. They would have to call all the carers into the office to update the phones individually. This is obviously unacceptable.

Is there a way to programmatically check if there is an updated version of my app on the Play Store?

Could i have code that runs every time the user starts the app that checks the Play Store?
If there is an updated version then the user could be directed to the playstore. This will mean it is not essential to have the auto-update checked.

Thanks in advance

Matt

Answer

There is no official Google API (that I know of) which supports this.

You should consider to get a version number from an API.

Instead of connecting to extern API's or webpages (like Google Play Store). There is a risk that something changes in the API or the webpage, so you should consider to check if the version code of the current app is below the version number you get from your own API.

Just remember if you update your app, you need change version in your own API with the app version number.

I would recommend.

Make a file in your own website or API, with the version nummer. (Eventually make a cronjob and make the version update automatic, and send a notification when something went wrong)

You have to get this value from your Google Play Store page.

<div class="content" itemprop="softwareVersion"> 1.2.5  </div>

Check in your app if the version used on the mobile is below the version nummer showed on your own api/site.

Show indication that she/he needs to update

Things you can do

Version number in own API

Pros:

  • You don't have to update the app when something went wrong with version updating.

Cons:

  • API can be offline
  • Play store webpage could change so your version 'ripper' does not work anymore.

Version number on webpage Google Play Store

Pros:

  • You don't need an API

Cons:

  • You have to update the app when something is changed.
  • Play store webpage could change so your version 'ripper' does not work anymore.