How can I check if an URL exists and, if yes, do something? I'm making an app that get updates from a private server (HTTP). What I want to do is the following:
1) Check if the URL exists.
2) If response is positive, then display a dialog that let you download the update.
3) If response is negative, then display a dialog which tells you that the current version installed is the latest.
I wrote a little code that download the update from the server but it doesn't check if the URL exists. In fact, it tries to "download" the update also when the new APK isn't on the server (so it downloads nothing). Can someone help me with this? Thanks in advance.