I am trying to execute the following code :
public void OnLocationChanged(Location location) {
var lat = (TextView)FindViewById<TextView> (Resource.Id.latitude);
var lon = (TextView)FindViewById<TextView> (Resource.Id.longitude);
var stName = (TextView)FindViewById<TextView> (Resource.Id.st_name);
lat.Text = string.Format ("Latitude: {0:N5}",location.Latitude);
lon.Text = string.Format ("Longitude: {0:N5}", location.Longitude);
try{
Geocoder geocode = new Geocoder (this);
List<Address> getAddrTask = new List<Address>(geocode.GetFromLocation(location.Latitude,location.Longitude,1));
Address returnedAddress = getAddrTask.FirstOrDefault();
if(returnedAddress != null){
System.Text.StringBuilder strReturnedAddress = new StringBuilder();
for(int i=0; i<returnedAddress.MaxAddressLineIndex;i++){
strReturnedAddress.Append(returnedAddress.GetAddressLine(i)).AppendLine(",");
}
stName.Text = strReturnedAddress.ToString();
}
}
catch(IOException e){
Toast.MakeText (this, e.Message, ToastLength.Long).Show ();
}
}
it all works great and charming, but when executing it, it gives me on the application output : [Choreographer] Skipped 42 frames! The application may be doing too much work on its main thread.