Inspect Network Traffic with Charles Proxy
Charles Proxy is a powerful tool that can view the internet traffic between the video player and the internet.
Charles Proxy can be used to capture media requests and correlate failing segments with decoder errors. Including a Charles Proxy export when opening a support ticket helps speed up the investigation and resolution process.
To use Charles as a proxy for your mobile app, first download and install Charles on your computer. Then, follow the Charles documentation to install its SSL certificate on your Android emulator or mobile device.
Connect your mobile device to the same Wi-Fi network as the computer running Charles. In your device’s advanced network settings, configure the proxy using the IP address of your computer.
Allowing Your App to Trust User-Installed Certificates
For Charles to intercept your mobile app’s HTTPS traffic, you must configure the app to trust user-installed SSL certificates. By default, modern Android only trust system certificates, which prevents debugging tools like Charles from decrypting SSL traffic.
Create a network_security_config.xml
file in your app’s res/xml/
directory.
Add the following configuration to allow user certificates in debug builds:
<network-security-config>
<debug-overrides>
<trust-anchors>
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
Reference this file in your app’s AndroidManifest.xml
:
<application
android:networkSecurityConfig="@xml/network_security_config"
... >
</application>
Rebuild and install your app. When running on a device with the Charles certificate installed, Charles can now decrypt HTTPS traffic.
Updated 1 day ago