Closed warrenZY closed 3 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
The code just work right well in windows as image shows, it correctly sends the GET and get Response from server. but just sending noting well running on Android In Android, when I press the send button, nothing happend. Debug shows that it just jumping back forth between Line 33,41,46 and never runs to Line 47
This is what i captured from the network traffic(I open a hotspot and connect my phone through it), unlike the windows its just show nothing. The only request show that's come from my web browser well testing connectivity and ensure there's nternet Access.
I thought I find the real reason, Android system restricted clear text traffic causing this http Get Request cannot being Send. Fix it by adding android:usesCleartextTraffic="true" at manifest
I thought I find the real reason, Android system restricted clear text traffic causing this http Get Request cannot being Send. Fix it by adding android:usesCleartextTraffic="true" at manifest
Android intends you to only use https. If you try http url you get this problem. Change to https and it works.
Android intends you to only use https. If you try http url you get this problem. Change to https and it works.
That's right, but I did own that server. And the server only supports Http, instead of Https. What a mess, I'm not sure if there's any way else can solve this problem, Hope there would be an easier way to One Click Config. LOL!
Hi, currently from Xamarin to .NET 8 MAUI these NuGet assemblies/packages are not compatible, what are the solutions?
Xamarin.Android.Google.BillingClient Xamarin.GooglePlayServices.Ads Xamarin.GooglePlayServices.Location Xamarin.Google.UserMessagingPlatform Xamarin.AndroidX.Browser Xamarin.AndroidX.Core Xamarin.AndroidX.Lifecycle.LiveData Xamarin.AndroidX.MediaRouter Xamarin.AndroidX.Palette Xamarin.AndroidX.RecyclerView Xamarin.GooglePlayServices.SafetyNet AdsJumbo
SkiaSharp.Views.Forms
Xamarin.Android.Support.Collections Xamarin.Android.Support.CustomTabs Xamarin.Android.Support.Interpolator Xamarin.Essentials Xamarin.Forms Xamarin.Android.Support.Design Xamarin.Android.Support.v7.AppCompat Xamarin.Android.Support.v4 Xamarin.Android.Support.v7.CardView Xamarin.Android.Support.v7.MediaRouter Xamarin.Essentials Xamarin.Forms Microsoft.NETCore.UniversalWindowsPlatform
Thanks so much to anyone who will help! 🙂
@sviluppomania please do not randomly ask questions in other issues.
@warrenZY unfortunately there is no other way. Both Android and iOS enforce using https unless you opt-out of it with what you just did. This is not a .NET MAUI thing, but rather something on the platform. Glad you figured it out!
Description
I tried to kinds of writing but non of them work, while connecting to my ZTE device and debug.
I need to send Get with customized cookie.
I tried:
if ANDROID
endif
var httpClientHandler = new HttpClientHandler() { UseCookies=false }; //httpClientHandler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator; //httpClientHandler.AllowAutoRedirect = false; //var httpClient= new HttpClient(httpClientHandler); if (DeviceInfo.Current.Platform == DevicePlatform.Android) { var httpClient = new HttpClient(new Xamarin.Android.Net.AndroidMessageHandler()); } else { var httpClient = new HttpClient(httpClientHandler); }
var httpRequestMessage =new HttpRequestMessage(HttpMethod.Get, uri); httpRequestMessage.Headers.Add("Cookie", $"mobile_enterprise={mobileNumber}"); var ret= await httpClient.SendAsync(httpRequestMessage); ret.EnsureSuccessStatusCode(); return await ret.Content.ReadAsStringAsync();
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.71 SR7.1
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 13
Did you find any workaround?
No response
Relevant log output