1

PROBLEM

I want to make sure that user of my app is not using a really old version of my app. Just like it happens in WhatsApp that if you are using an outdated version it shows a message that current version has become obsolete, update your app from playstore. I want to achieve this kind of behavior in my app too.

Way I thought to achieve this

To achieve this behavior I thought of hitting a web service at start of app which will give latest version number of app available in response. That version number will be updated manually in backend on new update release, and in app I will get the current installed version of my app through code(if possible) and compare it with the version returned from web service. Web service will also return minimum install version required. So comparing with it I will show user dialog for updating app from play store.

This is what I thought to achieve this behavior. I want to know if this is correct way of doing this and if not please suggest me more appropriate way of achieving this behavior. Thanks

4
  • well getting a version number is a way to do what you want but IIRC it is against Play Store rules to manually install updates to your app
    – tyczj
    Feb 24, 2016 at 16:22
  • no I will not install update manually i will redirect them to play store link Feb 24, 2016 at 16:24
  • Sounds good. We use the same functionality in one of our apps. The app checks the backend, which responds with the earliest version of the app we support. If the app is too old, we notify the user and direct them to the Play Store to update the app. Feb 24, 2016 at 16:29
  • so means I am on right track Feb 24, 2016 at 16:32

1 Answer 1

2

Yes, this is the correct approach.

If your app is using a web service, but not for everything, you can consider to only show the dialog if the service needs top be used. This minimizes the number of unnessecary requests to the server.

Normal is: Client sends request and own version number. Server checks version number. If it is recent enough, it handles the request, otherwise returns an OUTDATED response: If the client receives this OUTDATED response it can show a dialog and redirect to play store.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.