Search code examples
androidgoogle-chromenetwork-programminggoogle-chrome-devtoolsbandwidth-throttling

Testing Network Throttling using chrome dev-tools for an android app does not work


Goal: Test android app on a physical device with various network connectivity issues (Offline, Slow 3G etc). Android Emulator is not an option for my use case.

Steps I have tried: (Remote Debugging)

  1. Connect my phone to my computer and open the app on my phone.

  2. In chrome "Remote devices" I select my phone and click on inspect for the app opened on my phone. Once the Developer Tools window opens I can play with my app from chrome.

  3. In the network tab I can see the throttling options but when I try the offline option or any other option to slow down the network it does not seem to work.

The offline/slow 3G option works for a normal website but not when using remote devices. I wanted to see if anyone has tried this option before and if it worked for them and I would appreciate suggestions for better alternatives to test an android app with various network settings other than using chrome remote devices?

Other options I have come across are installing a proxy app on PC/Mac and configure networking throttling in the app and then create a wifi hotspot and connect my phone with it. This is possible but it would be tricky with the tools we use so I was looking for a more elegant solution.

Screenshot of how chrome dev-tools looks


Solution

  • The "remote devices" of chrome won't affect your native app. It will not even affect another opened tab other than the one you are "inspecting" and throttling. If you really need to throttle your device's network connection you should use a proxy. A good and easy to handle proxy is Charles web debugging. The free version will cover your needs if you are willing to reconnect every 30 mins. But for sure I recommend you purchase a license since this tool will be always helpful and developers also need to make a living ;)

    Here is an example of setting up Charles as a proxy for an android device.