Our application is only targeted for API level 14 and above, and therefore we are not extending ActionBarActivity
or using any of the compatibility libraries.
Is it still possible to use the CastCompanionLibrary
, as it seems to assume that one is using the compat libraries and extending ActionBarActivity
?
Thanks
The answer is no. If you want to use Cast functionality, you need to have media router from v7-support library (the MediaRouter in the Android framework itself is not adequate/not used in cast). The v7-support media router library depends on v7-support appcompat library. So in short, regardless of what api level you are using, you need to have those two support libraries present in your project if you want to use Cast SDK. Then to show a Cast icon, you have a few options; for one of them your activity has to extend ActionBarActivity (CCL supports this), and for the MediaRouterButton approach, it has to extend FragmentActivity (I may consider adding support for this to CCL). It is possible to manually add a button and make that work if you are just using an Activity but presence of the two support libraries is required, CCL doesn't handle these other cases.
Update: CCL now supports FragmentActivity and MediaRouteButton.