媒体会话验证器
Media Session Validator 是一款工具,可让您轻松地以自动化方式验证 Android TV 应用与 Media Session 的集成。这还会验证在 Android TV 应用中支持 Cast Connect 的前提条件。
下载和安装 APK
在 Android TV 设备上启用 Android 调试桥 (adb) 调试,连接到设备,然后安装 APK。
上次更新时间:2021 年 6 月 21 日
下载媒体会话验证器 APK
操作说明
为媒体会话验证器启用通知使用权。
依次前往:设置 > 应用 > 特殊应用权限 > 通知访问权限 > 媒体会话验证器
打开媒体会话验证器,然后选择开始验证:

返回 Android TV 主屏幕,然后打开媒体应用。
从应用中选择任何媒体内容,然后开始播放。
验证程序应自动开始测试并执行媒体命令:

验证程序完成测试后,返回 Media Session Validator 应用查看结果。
选择查看验证结果,然后选择一个应用以打开结果屏幕:

结果界面会显示包含说明的测试用例列表:

如果您看到任何失败或警告测试用例,请查看说明并修复应用中的所有问题,然后重新运行验证。
如需查看或分享测试结果,您还可以通过 ADB 下载验证报告:

如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-07。
[null,null,["最后更新时间 (UTC):2025-03-07。"],[[["Media Session Validator is a tool used to ensure your Android TV app correctly integrates with Media Session and meets the requirements for Cast Connect support."],["To use the tool, download and install the Media Session Validator APK, enable Notification Access for it, and then initiate validation within the app."],["While your media app plays content, the validator automatically tests media commands and provides a detailed report on the results."],["After the validation process, you can review the results within the app, addressing any failed or warning test cases in your app's code."],["For further analysis or sharing, you can download a comprehensive validation report using ADB."]]],[]]