Enabling Stetho on ExoPlayer 2 Demo Application
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.
It’s also very easy to enable Stetho on the ExoPlayer 2 demo application:
- 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:
- Install the demo app on an Android device
- Start Google Chrome on your development pc connected via USB debugging to the device and type chrome://inspect in the address bar
- Click the inspect link on the page to open the Developer Tools
- Click the Network tab on Developer Tools window