If your app uses MediaBrowserService API‘s check out this google sample project, helps testing Android apps that use Media Player. The MCT app surfaces information about the media app’s MediaController, such as the PlaybackState and Metadata, and can be used to test inter-app media controls.
How to run:
- Check out the MCT project and run.
- Open MCT app, and test your app by clicking on ‘Control’ or ‘Test button’. (Make sure your app is whitelisting MCT app).
- You can send “$adb shell” commands to control MCT app.