tezvyn:

Android Network Security Configuration

Source: developer.android.comintermediate

Define your app's network trust rules in a simple XML file instead of writing complex code. Use it to block cleartext (HTTP) traffic, trust self-signed certs in debug builds, or pin certificates.

Android's Network Security Configuration lets you define network trust rules declaratively in an XML file, separating security policy from app code. It's crucial for enforcing HTTPS, trusting custom CAs for staging servers, or using certificate pinning to prevent man-in-the-middle attacks. The biggest footgun is not having one; apps targeting Android 9+ block HTTP traffic by default, so you must explicitly create a config to allow legacy connections or they will fail silently.

Read the original → developer.android.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

Android Network Security Configuration · Tezvyn