3

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

Kartheek Mannepalli
  • 186
  • 1
  • 2
  • 15
  • Are you talking about a native Android app, or a web app that you're running on your Android phone? The idea with Remote Debugging is that you actually run and load the page from your mobile phone, but you can profile the results from the connected laptop. – Kayce Basques Jan 11 '18 at 20:09
  • Sorry I should have been clear but I was talking about a native android app. – Kartheek Mannepalli Jan 11 '18 at 21:41

2 Answers2

2

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.

Shiny
  • 4,945
  • 3
  • 17
  • 33
goemic
  • 1,092
  • 12
  • 24
1

It's a little unclear from your question, but I'm assuming that you're using Remote Debugging to run a webpage on an Android device, and you want to profile the webpage from a laptop/desktop connected to the Android.

One workaround is to use https://www.webpagetest.org/easy. This actually runs your webpage on a real Motorola G device in Virginia with a Slow 3G connection. It gives you a detailed report on your loading performance, just like the DevTools Performance panel.

One of the DevTools team members said that Remote Debugging + Network Throttling should work, but neither of us has tried it recently.

Kayce Basques
  • 23,849
  • 11
  • 86
  • 120