Forum Xamarin.Android

Problem Httpclient very slow

PetrTNPetrTN Member
edited December 2018 in Xamarin.Android

I have a problem with Httpclient on the Android device.

I have a code:
private async void GetProducts()
var client = new HttpClient(new Xamarin.Android.Net.AndroidClientHandler());
var response = await client.GetStringAsync("h ttp://" + ipAddress + "/api/index.php);

When I'm in the local network "" then the request returns to max 1-2s.
When I'm on the Internet, the request always takes more than 30s.

Project settings:
HttpClient implementation: Android
SSL/TLS: Default(Native TLS 1.2+)

I do not use the proxy!
Tested: Still the same 30s
var handler = new AndroidClientHandler { UseProxy = false };
var client = new HttpClient(handler);

Where can the problem be?
Please help me. Thank you.

Sign In or Register to comment.