Reputation: 83
My android app is published in google play store. I want to do,
The problem I face is,
So what i want is, the user opens my app, checks for the current version code of the app and compare with version code of the app that is in google play store.
I find it difficult to get the version code of the app that is in play store.
I tried following links to get the version code of the app on google play store but of not help.
https://code.google.com/p/android-market-api/
[How to allow users to check for the latest app version from inside the app?
please help..
How can i programmatically get the version code of the app that is on play store.
Or is there any way that by which I can manually trigger the default built-in event as handled by google play services?
Upvotes: 0
Views: 7110
Reputation: 736
We made a CLI to make this much simpler: https://github.com/inspire-labs-tms-tech/google-play-app-version-code-cli
The README provides much better setup docs, etc., but getting the next available versionCode
is basically as simple as running:
JSON=$(cat ~/path/to/key.json) && google-app-version next -f "$JSON" --package com.company.app
# 15
Or, for the current/latest release versionCode
:
JSON=$(cat ~/key.json) && google-app-version latest -f "$JSON" -p com.company.app
# 14
Upvotes: 0
Reputation: 31
Actually, solution that based on Google page html is not stable and need to be changed whenever Google update their layout. In addition, the version number from Google page is truly versionName but not versionCode. For example: Regard to build.gradle file, versionCode is 5 and versionName is 5.1. For this case, Google store page will show us Current version is 5.1 but not 5.
Upvotes: 0
Reputation: 21657
why don't you save your latest version in a google document on google drive and from your application read that value?
Here is the api
Upvotes: 1