Exist some way in java for android, to detect the faster download url and choose the faster?
Example i have two urls for the same thing, and i want to choose the faster according to different location, that may have one faster than another.
Exist some way in java for android, to detect the faster download url and choose the faster?
Example i have two urls for the same thing, and i want to choose the faster according to different location, that may have one faster than another.
How about you ping to a website from your app and keep track of time spent in receiving a response?
See How to ping a website from an Android activity and get response?
you can use startTime and endTime variables in the code and compare the difference.
try{
Log.e("checking", "Checking network connection...");
//startTime
httpClient.execute(httpGet);
//EndTime
Log.e("checking", "Connection OK");
return;
}