UsesCleartextTraffic setting information missing #2252
Labels
doc-enhancement
Improve the current content [org]
dotnet-maui/subsvc
dotnet-mobile/svc
Pri2
📌 seQUESTered
Identifies that an issue has been imported into Quest.
Type of issue
Missing information
Description
To configure android to accept HTTP traffic from your localhost (such as running an API from VS) you need to set the setting
UsesCleartextTraffic
totrue
the documentation does talk about network security configuration but there is a much simpler solution, add the following code at the top of the androidMainApplication.cs
class found underPlatforms
->Android
then you can call HTTP endpoints on10.0.2.2
.Therefore unless the user has changed other settings the full class will look like
Page URL
https://learn.microsoft.com/en-us/dotnet/maui/data-cloud/local-web-services?view=net-maui-8.0
Content source URL
https://github.com/dotnet/docs-maui/blob/main/docs/data-cloud/local-web-services.md
Document Version Independent Id
663379bf-421a-57f1-39b7-e92f830de0ed
Article author
@davidbritch
Metadata
Associated WorkItem - 259815
The text was updated successfully, but these errors were encountered: