Is there any way for an Android application that it can monitor its own HTTP requests-responses?
I have used Charles proxy tool, works well, but can we have any in-app solution? Apps like wireshark accesses TCP/IP packets using tcpdump Linux tool, but it requires root access.
If somehow I create a proxy local port programatically and keep listening on that, maybe I can achieve what I need; but obviously configuring network programatically to set proxy requires root. [I checked ProxyDroid app, which lets us set proxy]
I don't see any way for a non-rooted device if I could monitor at-least my own app's http stuff. Logging HTTP requests/responses manually is not what I want. TrafficStats API provides info about number of bytes|packets received|transmitted, not more detailed monitoring of even our own calls.
Any sort of clarification/confirmation/suggestion is welcome.