Hello,
I have currently a strange problem when I try accessing google api with HttpClient.
Here the code :
public async Task<string> AutoCompletionGooglePlace(string _input)
{
string path = GoogleApi.Instance.googleApiUri + "place/autocomplete/json?input=" + _input + "&types=geocode&language=fr&key=" + GoogleApi.Instance.Key;
using (var client = new HttpClient())
{
//string test = JsonConvert.SerializeObject(_apiToCall);
HttpResponseMessage response = await client.GetAsync(new Uri(path));
if (response.IsSuccessStatusCode)
{
var stringContent = await response.Content.ReadAsStringAsync();
return stringContent;
}
return null;
}
}
When I use GetAsync, Android System ask to wait because application isn't responding.
I can wait the time as I want, I don't receive any response.
Somebody have an Idea ?