I have build my very first application to Android and I want now to let the application to check my server for new updates when the user starts the application; if the version in the APK filename (for example weather-right-now-11.apk) is different with the actual version, prompt user to download the new update. How can I accomplish this?
Thanks in advance!
add this to your main activity :
and add your action in this function.
onResumerun on every start of activity.you must have a server that connect to it and check version of application and download it, you can check your version with this :
you can use tcp or udp packet to connect to server and check your last version. This is a link that you can learn about tcp :