0

I want my app to check in background if there is a new version of the app on MY server (not play store servers). How is it possible?

I already thought maybe i could send a background request with asynctask to my server and evaluate it with some kind of server logics (javascript?)?

Deividi Cavarzan
  • 10,034
  • 13
  • 66
  • 80

2 Answers2

1

Make an HTTP-Request to your server. The script at the URL it's calling should simply return the number of the new build you made. In the App you will now be able to check the answer, wich contains the build number and compare it to its own build number.

CoderPi
  • 12,985
  • 4
  • 34
  • 62
0

Just have an simple get api for knowing the current version of your app on the server. then find the version of your app using BuildConfig.VERSION_CODE; if the version code in your server is greater than this, then there is an update available

Ravjit Singh
  • 798
  • 5
  • 17