I have an issue in my application Cleartext HTTP traffic to x not permitted.
I've already tried putting android:usesCleartextTraffic="true" in my manifest. But i want to change "android:usesCleartextTraffic" flag to "false" to prevent unencrypted traffic from being sent.
How to solve this?
If at some point you want to move to MAUI (which has no AssemblyInfo.cs), you might want to add UsesCleartextTraffic to your Application attribute in Platforms/Android/MainApplication.cs:
#if DEBUG // connect to local service on the
[Application(UsesCleartextTraffic = true)] // emulator's host for debugging,
#else // access via http://10.0.2.2
[Application]
#endif
public class MainApplication : MauiApplication
{
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With