Xamarin.android httpclient slow internet connection


In my App i use httpclient with modernhttpclient.
In iOS, with Wifi On or Off, my requests to webservice works perfectly.
When I use Wifi on in Android, it works perfectly, too.
But when Wifi is off in Android, I have lte on, the request is taken too Long, so i get an timeout.
If I set httpclient.timeout, then it works after a few minutes.

But why is the Connection so slow on Android and in iOS not?
For your understanding, I use https.
What am I doing wrong?

client = new HttpClient(new NativeMessageHandler());
client.BaseAddress = new Uri(App.hostserveradress);
var contentReset = new StringContent(mobileJSON, Encoding.UTF8, "application/json");
HttpResponseMessage responseReset = null;
string resultReset = "";
responseReset = await client.PostAsync("GetResetFotos", contentReset); // Here it takes a few minutes on Android
resultReset = await responseReset.Content.ReadAsStringAsync();


  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    As in seems to be o.k. with iOS (both, Wifi and lte) and Android with Wifi, it seems to be a problem with Android and lte or modernhttplient and Android or Android and lte and modernhttplient :smirk:
    So I would search the internet for this words...

  • PhilippWegenerPhilippWegener USMember ✭✭

    We tested on an older Device, with an older Version of Android.
    The result is, that Android 7.0 or higher has Problems with SSL or httpclient.
    Now, i dont know, what can be the solution.

  • PhilippWegenerPhilippWegener USMember ✭✭

    Google not Shows me any Solutions, I Need some help...

Sign In or Register to comment.