Google Cast & Android -
i'm attempting familiar google cast , it's usage inside android application. codebase working has working integration, seems have various discrepancies when compared official guides.
for example, 1 of first steps in guide implement optionsprovider interface, so:
class castoptionsprovider implements optionsprovider { @override public castoptions getcastoptions(context appcontext) { castoptions castoptions = new castoptions.builder() .setreceiverapplicationid(context.getstring(r.string.app_id)) .build(); return castoptions; } @override public list<sessionprovider> getadditionalsessionproviders(context context) { return null; } } however, codebase i'm working not implement interface anywhere in application. confused, took @ dependencies , noticed following dependency:
compile 'com.google.android.gms:play-services-cast:$androidgoogleservicesversion'
this odd, guide recommends using following instead:
compile 'com.google.android.gms:play-services-cast-framework:10.0.1'
googling differences between com.google.android.gms:play-services-cast-framework library , com.google.android.gms:play-services-cast library returned no usable results.
additionally, unable find these libraries on either jcenter or maven.
my questions:
- what differences between
com.google.android.gms:play-services-cast-framework,com.google.android.gms:play-services-cast? - where these libraries hosted?
thanks!
so there lot unpack here...
1. sounds app using ccl, modified version of v2 client. can verify searching app's build.gradle "com.google.android.libraries.cast.companionlibrary:ccl" dependency. requires com.google.android.gms:play-services-cast rather com.google.android.gms:play-services-cast-framework, although play-services-cast transitive dependency of play-services-cast-framework, included implicitly. castoptionsprovider new thing v3 cast api. ($androidgoogleservicesversion groovy variable providing version number , should set somewhere else, in projects top level build file. represents 10.0.1.)
ccl https://github.com/googlecast/castcompanionlibrary-android
ccl -> v3 migration https://developers.google.com/cast/v2/ccl_migrate_sender
2. these libraries either pulled local sdk. in sdk tool under sdk tools/google play services. can pulled google's maven repo, can setup via instructions here: https://developer.android.com/studio/build/dependencies.html#google-maven. note, in androidstudio 3.0 can use google() load it.
Comments
Post a Comment