Capture Android request/response calls using Postman

Daniyar Nurgaliyev
3 min readNov 6, 2021

--

Photo by Parker Coffman on Unsplash

Let’s try to capture real android device calls to backend using Postman capture feature.

You can use Postman’s official tutorial, but if you faced the problem, here i will try to make more or less clear.

My current Postman version is 9.1.3

1. get laptop local ip address: let’s assume 192.168.0.80

2. In phone wifi settings change to this:

3. On mac go to “Computer” ->

-> Macintosh HD
-> Users
-> your_username
-> make hidden files visible (command+shift + . )
-> Library
-> Application Support
-> Postman
-> proxy
-> here you will find file postman-proxy-ca.crt

4. From here you can use Postman’s official instructions:

5. Then adjust android. You can use Postman’s official instructions:

Copy that certificate (postman-proxy-ca.crt) to your device e.g. to Downloads folder.

I use Pixel 5:

-> Go to Security
-> Encryption & credentials
-> Install a certificate
-> CA certificate
-> Install anyway
-> Select postman-proxy-ca.crt
-> Toast will appear notifying that CA certificate installed.

To this point you can use phone browser and will see the calls to server, but in order to listen to application calls, do next:

6. Now inside your project create xml file:

res/xml/network_security_config.xml

Add this code:

in AndroidManifest.xml:

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

7. Now click capture in Postman:

Then go here:

8. That’s it.

--

--