mousebird-consulting-inc / WhirlyGlobe

WhirlyGlobe Development
Other
831 stars 255 forks source link

Tutorial should mention a security policy file #1538

Open TimSylvester opened 2 years ago

TimSylvester commented 2 years ago

Depending on target/min API version, the usesCleartextTraffic attribute in the manifest may not work, and a security policy file should be used instead:

Manifest:

<application
      ...
      android:networkSecurityConfig="@xml/network_security_config">
      ...
</application>

res/xml/network_security_config.xml:

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config cleartextTrafficPermitted="true">
        <!-- Maply tile loading -->
        <domain includeSubdomains="false">[tile.stamen.com](http://tile.stamen.com/)</domain>
    </domain-config>
</network-security-config>