Firstly, this is a kind of redundancy, since the Android Market automatically notifies the user about the update, but for this you need a server, put the txt file on this server containing the information that your code looks like since in this case your code is looking for the version code. This code is here:
int curVersion = getPackageManager().getPackageInfo("your.app.id", 0).versionCode; int newVersion = Integer.valueOf(s);
Then your application will have to put these two together, and if newVersion is bigger than curVersion, open the market on the page of your application where the user can update it.
The code you posted did all this, but for a more specific answer to your question in the url, you need to put the url in your "currentVersion.txt file" or what ever was the file name.
I hope I helped!
source share