in my android app i want to know that user has updated the app from google play or still using the older version Is there any way to resolve this please let me know
-
1check current version using web API. compare with app version – Dhaval Parmar Jan 11 '16 at 06:38
-
hv a look here http://stackoverflow.com/questions/9849889/how-to-notifiy-users-about-an-android-app-update – Mahalakshmi Jan 11 '16 at 07:21
-
you have understood this question in wrong way @Mahalakshmi. – Amit Vaghela Jan 11 '16 at 07:55
3 Answers
To Check current version of user you need to know what version user has.
for this ,
send current version as a parameter in webservice and it will return which is the current version.
PackageManager manager = context.getPackageManager();
PackageInfo info = manager.getPackageInfo(context.getPackageName(), 0);
string version = info.versionName;
checkout this link to get version code

- 1
- 1

- 22,772
- 22
- 86
- 142
First check the current version of the app by using the following code--
PackageManager manager = context.getPackageManager();
PackageInfo info = manager.getPackageInfo(context.getPackageName(), 0);
String version = info.versionName;
After getting the the current version either by parsing the play store link or version by hitting your web service you can get the server version of the app. After that you can easily compare version (client version of the app) and the server version(version of app on play store.)

- 121
- 1
- 4
For this you need to maintain the current version in your own server and query that information from your app time to time.
This is quite trivial to do, if you already own a server. You can keep this information in an xml or json.
If your current app version is less that the version returned by the server, then display a dialog to the user that he/she needs to update and direct the user to the Play Store page of the app.

- 15,355
- 10
- 73
- 107
-
thanks for the help ... but my question is how to get weather user has update the app or not if not will send the notification to only those members only – Andro Devlpr Jan 11 '16 at 09:15
-