0

I am getting problem of getting latitude and longitude from the google url as shown below and i am using asynctask,no problem of network.i have address array which has 4 adderesses and i am using like below:

for(int i = 0; i < address.length; ++i) {
Log.e("i value: ",i+"");
try {
HttpPost httppost = new HttpPost("http://maps.google.com/maps/api/geocode/json?address=" + address[i] + "&sensor=false");
HttpClient client = new DefaultHttpClient();
.......   //codes to get lat and long
.......
} catch(......) {
 }
}

As you can see i print the i value using Log.It is coming as 0,1,2,3,but it is calling this url for first time only i.e. for i value 0 and getting the lat and long of that address but not for the next 3 values.Any help ? thanks

Android Killer
  • 18,174
  • 13
  • 67
  • 90

0 Answers0