百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

CastVideos-android

> 编程语言
开源

参考 Android 发送器 (带有框架 API): CastVideos-android 应用程序展示了如何从完全符合 Cast 规范的 Android 设备中播放视频。

369 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

参考 Android 发送器 (带有框架 API): CastVideos-android 应用程序展示了如何从完全符合 Cast 规范的 Android 设备中播放视频。

CastVideos-android (reference Android sender app)

This Google Cast demo app shows how to cast videos from an Android device in a way that is fully compliant with the Design Checklist.

This is a reference sender app to be used as the starting point for your Android sender app

List of reference apps and tutorials

Dependencies

  • Android Volley library

Setup Instructions

  1. Get a Google Cast device and get it set up for development: https://developers.google.com/cast/docs/developers#setup_for_development.
  2. [Optional] Register an application on the Developers Console http://cast.google.com/publish. The easiest would be to use the Styled Media Receiver option. You will get an App ID when you finish registering your application. This project uses a published Application ID that can be used to run the app without using your own ID but if you need to do any console debugging, you would need to have your own ID.
  3. Import the project into Android Studio or use gradle to build the project.
  4. Compile and deploy to your Android device.
  5. This sample includes a published app id in the res/values/strings.xml file so the project can be built and run without a need to register an app id. If you want to use your own receiver (which is required if you need to debug the receiver), update "app_id" in that file with your own app id.

Automated UI Testing on Cast Sender App

This Google Cast demo app also includes sample Cast test cases in androidTest/. It is recommended to implement and run automated testing for your Android sender app to ensure the best Cast experience for users.

How to run test cases

  1. Update cast_test_target_device in [res/values/cast_test.xml] with your Google Cast device name.
  2. Connect to a physical Android device and make sure your device is unlocked.
  3. Follow Espresso setup instructions to turn off system animations under Settings > Developer options.
  4. In Android Studio, click the Sync Project with Gradle Files button.
  5. Go to CastTestSuite.java, right click and Run 'CastTestSuite' or right click to run single test case (ex: testCastingVideo()).
  6. [Optional] Adjust timeout setting in [res/values/cast_test.xml] if necessary.

UI testing frameworks

  • Espresso
  • UI Automator
  • Note: The UI Automator framework requires Android 4.3 (API level 18) or higher.

Documentation

  • Google Cast Android Sender Overview
  • Developer Guides

References

  • Android Sender Reference
  • Design Checklist

How to report bugs

  • Google Cast SDK Support
  • Sample App Issues

Contributions

Please read and follow the steps in the CONTRIBUTING.md.

License

See LICENSE.

Terms

Your use of this sample is subject to, and by using or downloading the sample files you agree to comply with, the Google APIs Terms of Service and the Google Cast SDK Additional Developer Terms of Service.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Java

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言