# CastCompanionLibrary-android
CastCompanionLibrary-android is a library project to enable developers integrate Cast capabilities into their applications faster and easier.
## Dependencies
* google-play-services_lib library from the Android SDK (at least version 9.8.+)
* android-support-v7-appcompat (version 25.0.0 or above)
* android-support-v7-mediarouter (version 25.0.0 or above)
## Set up Instructions
Set up the project dependencies. To use this library in your project, you have two options:
(1) Add this library from jCenter repo by adding the following line to your project's
dependencies:
```shell
dependencies {
...
compile 'com.google.android.libraries.cast.companionlibrary:ccl:2.9.1'
}
```
(2) Use the GitHub source and include that as a module dependency by following these steps:
* Clone this library into a project named CastCompanionLibrary, parallel to your own application project:
```shell
git clone https://github.com/googlecast/CastCompanionLibrary-android.git CastCompanionLibrary
```
* In the root of your application's project edit the file "settings.gradle" and add the following lines:
```shell
include ':CastCompanionLibrary'
project(':CastCompanionLibrary').projectDir = new File('../CastCompanionLibrary/')
```
* In your application's main module (usually called "app"), edit your build.gradle to add a new dependency:
```shell
dependencies {
...
compile project(':CastCompanionLibrary')
}
```
Now your project is ready to use this library
## Documentation and Demo
See the "CastCompanionLibrary.pdf" inside the project for a more extensive documentation. The
[CastVideos-android](https://github.com/googlecast/CastVideos-android) reference sample app uses this library and
demonstrates how this library can be used in a real application.
## References and how to report bugs
* [Cast Developer Documentation](http://developers.google.com/cast/)
* [Design Checklist](http://developers.google.com/cast/docs/design_checklist)
* If you find any issues with this library, please open a bug here on GitHub
* Question are answered on [StackOverflow](http://stackoverflow.com/questions/tagged/google-cast)
## How to make 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](https://developers.google.com/terms/) and the [Google Cast SDK Additional Developer Terms of Service](https://developers.google.com/cast/docs/terms/).
## Google+
Google Cast Developers Community on Google+ [http://goo.gl/TPLDxj](http://goo.gl/TPLDxj)
## Change List
2.9.1 (bug fix release)
* Changed dependency on Cast SDK to 9.8.0 from 9.8.00
2.9.0 (bug fix release)
* Addressed the following issues: #322, #324, #326
* Updated to the latest versions of Cast SDK and support libraries.
2.8.4 (bug fix release)
* Addressed the following issues: #287, #294, #298, #301, #309
* Enabling debug through CastConfiguration now enables logging through LogUtils as well.
2.8.3 (available here and also from jCenter)
* Updated support libraries to version 23.2.1, this addresses the crash issue on KitKat when IntroductoryOverlay is used (see issue #278)
* Fixing an issue where InputStreams were not properly closed in FetchBitmapTask (credit goes to David Edwards)
* Fixing an issue where failure to load a media in a queue was not closing the full screen VideoCastControllerActivity (credit goes to Luzian Wild)
* Correcting some typos
2.8.2 (available here and also from jCenter)
* BACKWARD INCOMPATIBLE CHANGE: Removed Simple Widgets that were introduced in 2.8.0
* Updated support libraries to version 23.2.0
2.8.1 (available here and also from jCenter)
* Fixed issue #274
2.8.0 (available here and also from jCenter)
* CCL is now available from jCenter
* Introduced a collection of Simple Widgets: a number of cast-aware widgets that can be used with
no additional setup, managed by CCL.
* Changed the callback BaseCastConsumer.onDeviceSelected(CastDevice) to
BaseCastConsumer.onDeviceSelected(CastDevice, RouteInfo) to provide more information in the callback.
* Added a new callback BaseCastConsumer.onRouteRemoved(RouteInfo) to be called when a route is removed.
* Fixed #272 and a number of other minor issues.
* In their manifests, clients no longer need to add any "intent-filters" to the services and the receiver that CCL provides,
this enhances the security of the client applications.
* Updated the documentation.
2.7.4
* Fixed issue #269 where an unwanted scaling of a bitmap was resulting in reduced quality.
2.7.3
* Added a configuration parameter to allow clients define their own MediaRouteDialogFactory. As a result,
the protected method "getMediaRouteDialogFactory()" has been removed from the VideoCastManager and DataCastManager.
If you were previously using this method, please update your code to use the CastConfiguration object
to achieve the same.
2.7.2
* Now in the full-screen cast controller (VideoCastControllerActivity) and on lockscreen, images are
appropriately scaled down before being fetched, to avoid undesired OOM on devices with less memory.
* Fixed a couple of minor issues in the PDF documentation.
2.7.1
* Added a full-screen overlay for clients to introduce cast to users. This removes the
need to use any additional libraries for this purpose. Look at the javadoc for IntroductoryOverlay class for
the supported features, styling and customization of this view. For a working example, take a look at the
[CastVideos-android](https://github.com/googlecast/CastVideos-android) reference sample app.
* Fixed #256 (thanks to [curlyfrie](https://github.com/curlyfrie) for making the suggestion).
* Updated to the latest Play Service library (v8.4.0).
* Documentation has been updated to reflect the new changes.
2.7.0
* Changing how clients configure "features" in CCL: previously, clients would call initialize followed by
calling enableFeature() to add certain features, or would call certain direct APIs to control the behavior of the
library (e.g. by calling VideoCastManager.setCastControllerImmersive() or calling setLaunchOptions(), etc.).
Although that was working fine, it seemed more efficient and organized to move all "configuration" parameters to its own class.
This release introduces a new class "CastConfiguration". This class holds all those parameters that are used to control the
behavior of the library. To initialize the library, one now needs to build an instance of the CastConfiguration object
(using a Builder pattern) and then pass that as a parameter to the initialize() method of VideoCastManager or DataCastManager.
Please see CastApplication.java class in [CastVideos-android](https://github.com/googlecast/CastVideos-android) sample for
an example or see the documentation in the root of this project for more details.
* Starting to use the MediaRouteControllerDialog from the media router support library. Previously, CCL
was using a custom dialog since the one provided by the media router support library lacked many features that
were called for in the UX Checklist. In v23.1.1 of that library, however, things have improved so that there is no
longer a need for having a custom dialog. There is currently one missing feature in that support library's implementation
that will be addressed in the next release of that library: tapping on the content area is not captured. CCL has all
the required wiring and code for that to work properly as soon as the updated support library is released. You can switch back
to the old custom dialog, if desired, by visiting VideosCastManager.getMediaRouteDialogFactory() and following the comments there.
* Major update in Notification Service. Previously, the actions that were provided in the notification were limited
to play/pause and disconnect. In this release, clients can choose
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论



















收起资源包目录





































































































共 1387 条
- 1
- 2
- 3
- 4
- 5
- 6
- 14
资源评论


北方有片雪
- 粉丝: 8
- 资源: 12
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


会员权益专享
安全验证
文档复制为VIP权益,开通VIP直接复制
