Skip to Content

Step by Step with the SAP Cloud Platform SDK for Android

Part 11 — Using Fiddler to Trace Client Network Requests

Previous (SAML)   Home   Next (Server Logging and Tracing)

Fiddler can be used to track requests made by the app to the server, allowing the user to have an easier time debugging application requests and seeing both the app’s requests and the server’s responses.

The below examples will modify the sample and device to route any network requests through Fiddler.
Configure Fiddler
Configure Device
Configure App

Configure Fiddler

  1. In Fiddler, select Tools > Options.
  2. Under the Connections tab, ensure that the “Allow remote computers to connect” checkbox is checked.
  3. Uncheck “Act as system proxy on startup” so that Fiddler only captures traffic that is specifically proxied through it.
  4. Restart Fiddler.

Configure Device

In this step, we will setup the device to route its Wi-Fi connection through Fiddler.

    1. Go to the Wi-Fi window, which is under Settings > Wi-Fi.
    2. Modify your current Wi-Fi network and open “Advanced options”
    3. Set “Proxy” to “Manual” and set the “Proxy hostname” and “Proxy port” so that all the device’s network requests will be sent through fiddler.

      “Proxy hostname” should be set to the IP address of the computer that is running Fiddler. It can be found by running the command ipconfig from a command prompt.

      “Proxy port” can be found under Options > Connections > Fiddler listens on port (default is 8888).

    4. Save and go to http://ipv4.fiddler:8888/
    5. Click on “FiddlerRoot certificate” to download the certificate.
    6. Name the certificate (ie. Fiddler) and tap OK.

See Documentation for more details.

Configure App

In this step, we will allow Step by Step app to allow certificates added by users.

  1. Create a new xml file named “network_security_config” under the res/xml folder
  2. Replace the contents of the newly created network_security_config.xml file with the following:
    <?xml version="1.0" encoding="utf-8"?>
                <certificates src="system" />
                <certificates src="user" />
  3. In the AndroidManifest.xml file, under the application section add the below line.

Now you should be able to see the requests made by the app to the server, such as the OData call seen below.

Previous (SAML)   Home   Next (Server Logging and Tracing)

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply