beeware / briefcase-android-gradle-template

A template for generating Android Gradle projects with Briefcase
MIT License
18 stars 19 forks source link

Add a network security configuration to allow localhost HTTP #53

Closed freakboy3742 closed 1 year ago

freakboy3742 commented 1 year ago

Android doesn't allow HTTP connections by default. This is very inconvenient when dealing with localhost servers in the "positron"/"server-and-webview" application pattern.

This PR adds a stub network security configuration that allows cleartext HTTP, but only on 127.0.0.1 (and subdomains).

With this PR, both Positron examples in the Toga repo run without problems.

Fixes beeware/briefcase#916.

PR Checklist:

mhsmith commented 1 year ago

Later notes: https://github.com/beeware/toga/discussions/1801