This article describes the steps required to set up your Android device to proxy network requests through Charles, which is helpful for troubleshooting or debugging your implementation of Tealium for Android.
In this article:
Use the following steps to configure Charles Proxy:
8888in the HTTP Proxy Port field.
*.*as a wildcard, and SSL proxying will be enabled for all domains:
If your app ceases to function correctly, it is possible that the app is rejecting the self-signed certificate from Charles Proxy. If this happens, disable the wildcard match, and list only the Tealium domains. Recommended domains are:
On a Mac, you can hold down the Option key while clicking on the network icon in the system tray.
Use the following steps to configure your Android device to use Charles proxy:
8888, as when configuring Charles.
.cerand save in a location that you will remember for later.
.cerfile to your device using an SD Card, USB Cable, or remote transfer such as Google Drive.
As of Android N, additional steps area required to to add configuration to your application so that it trusts the SSL certificates generated by Charles SSL proxying. This means that you can only use SSL proxying with applications that you control.
In order to configure your app to trust Charles, you must first add a Network Security Configuration File to your app. This file can override the system default, enabling your app to trust user-installed CA certificates, such as the Charles Root Certificate.
In your configuration file, you can optionally specify that this only applies in debug builds of your application, so that production builds use the default trust profile.
Use the following steps to add the Network Security Configuration File and reference the file in the manifest for your app:
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
network_security_config.xmlfile to the manifest for your app.
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<application android:networkSecurityConfig="@xml/network_security_config" ... >
For additional information, go to the Charles Proxy SSL Certificates and scroll down to the Android section.
The following table provides tips used to filter your view of network traffic:
|Filter by device||
|Filter by domain||
Clearing the certificate and removing the PIN from an Android device is optional.
Use the following steps to clear the certificate, remove the PIN, or both: