Enabling Stetho on ExoPlayer 2 Demo Application

Erdem Guven
AndroidX Media3
Published in
1 min readSep 2, 2016

Stetho is a sophisticated debug bridge for Android applications. When enabled, developers have access to the Chrome Developer Tools feature natively part of the Chrome desktop browser.

— Updated the article according to changes in the code on 1st Nov 2016.

With Stetho, it’s very easy to inspect network activities of ExoPlayer.

This is what you get when you start a YouTube DASH video.

It’s also very easy to enable Stetho on the ExoPlayer 2 demo application:

  1. Add two new dependencies to demo/build.gradle:

2. Modify DemoApplication to initialize Stetho and to use OkHttp as network client:

To inspect the network activity:

  1. Install the demo app on an Android device
  2. Start Google Chrome on your development pc connected via USB debugging to the device and type chrome://inspect in the address bar
  3. Click the inspect link on the page to open the Developer Tools
  4. Click the Network tab on Developer Tools window

--

--