1

I want to remind the user that he is not using the latest release.

How can I get the last version code of my application?

Stev_k
  • 2,118
  • 3
  • 22
  • 36
Eric JOYÉ
  • 1,077
  • 9
  • 10

1 Answers1

0

You could keep track of it yourself, using SharedPreferences: http://developer.android.com/reference/android/content/SharedPreferences.html

So, from your next version and onwards, the app should store its version number (you can hard code it) in SharedPreferences.

Then request www.yourdomain.com/latest-version-of-my-app, where you return the latest version number of your app. Then compare that with the stored version number value in SharedPreferences and if SharedPreferences value != the response from the URL, then show a dialog prompting for upgrade

andrrs
  • 2,289
  • 3
  • 17
  • 25