I want to know if it is possible to check if the app that the user is running is the latest version that is available at Google PlayStore. I have read some answers and they say that this is not possible, but I see some apps that do this.
Can someone tell me how can I do this? I can see that this is possible.
Indeed the Google Play Services do not expose such API.
But you could use a workaround to check for newer versions: a simple request on your serveur could do, parsing the Play Store page could do too etc.
You can create an api on your server for these kind of operations.
Your api can return values such as currentVersionCode, minVersionCode and an updateMessage.
You can compare your apps version code, currentVersionCode and minVersionCode and show a dialog for nice to update or force update.
Related
I have an app on the Google Playstore and I want a way to alert my users whenever I deploy a new version of the app. I want to know how to make this possible. Does Google Playstore provide any APIs or SDKs to make this possible?
I use React-native for development, incase the answer may depend on this.
Yes, the Playstore supports this feature named In-app-updates
There is no official implementation for this here, but take a look at this.
You can use In-app updates:
In-app updates is a Google Play Core libraries feature that prompts
active users to update your app.
There are mainly two update flows.
Flexible updates
Immediate updates
Here is a detailed guide that describes how to support in-app updates in your app.
I know Apple has this API I can hit:
http://itunes.apple.com/lookup?bundleId={id}
However, for the PlayStore, I'm looking for something similar, rather than parsing the app page
https://play.google.com/store/apps/details?id={id}
and then looking for the <div> that contains itemprop="softwareVersion"
There are a few questions about this here on SO and elsewhere on the web, but they are outdated, and make reference to unofficial APIs.
There is no Official API for grabbing the App version from the Play store.
I'd be curious exactly what you would use such an API for, if you wanted to add it in a comment. There may be a better way of achieving what you want.
Edit:
For forcing an update to your app there are other recommendations. We normally recommend that you don't have "always update to the latest version in the Play store" to developers. For example, the user might want to use your app, but be in a place where they don't have much battery or wifi. Forcing them to update in such a situation is rude, it's much better to give them a week or two until a more convenient time.
If you want to do "never have a version that is more than a couple of weeks old", can I recommend Firebase Remote Config. This would let you on the server update a configuration options for your app saying "the user should have at least this version" and change the behaviour of your app accordingly. It is much more flexible at robust than polling the Play store.
Another approach can be the Support In-app updates besides Firebase Remote config.
Google has released the Support In-app updates feature in which the apps can nudge the users to update their apps without even going to the play store. If an update is available, the users will see a dialog or a full blocking screen where the UI is generated and controlled by google play.
In-app updates works only with devices running Android 5.0 (API level 21) or higher, and requires you to use Play Core library 1.5.0 or higher. After meeting these requirements, your app can support the following UX for in-app updates!
references are here and this helpful blog. Check this out, hope it will help.
Is there a way to check the version number/build number of your app on the Google Play Store? Do the provide any API for this purpose?
I have read most people just put a version number on the server and cross check that when necessary.
But it would be nice if I could just update the Google Play Store and have my app auto check the version on launch and direct to the page listing. Is there any possible way of doing this?
There is no direct way of doing this from Google. I wouldn't suggest using a server if that is not your need. You could always spin up an AWS that has a JSON payload that you can update to have the current app version.
The APIs that Google has for the Android developer console are limited and mostly around editing the listing.
There is unoffical android-market-api. It can be used to get version and versionCode from Play Store.
You can take a look about it here : https://code.google.com/p/android-market-api/wiki/HowToSearchApps
I would like to upload my app in play store, when the new version of this app is available, I want to inform client about that new available version. Actually, I have no any experience with play store and I have no idea of how to handle the problem I have mention above. I would like someone to give me tutorial link or guide me what I do need to know.
Thanks
You not need to explicitly need to know clients that your application is updated. Just upload another apk with updated version code, it will automatically updates users that version is updated , so they can take update directly.
Today, when I started the game greedy spider, there was a dialog box telling me there was an update and a link to get it from the market. I'd like to know how can I do that?
How can you change the app (like adding a dialog box at the opening) without pushing an update to the market?
Thank you!
There is no straightforward way of doing it.
I can imagine something like that:
There is an unofficial Market API which you can use to fetch the details about your app and check the version How to fetch Android Market data when there is no API?
You can start your own web-service which would return you the current app version
After you've fetched the new app version from some external source, the rest is pretty easy - get the current installed version from app's PackageInfo and show the dialog if it's lower that the newest one.