use of com.google.android.libraries.cast.companionlibrary.cast.CastConfiguration in project AntennaPod by AntennaPod.
the class CastManager method init.
public static synchronized CastManager init(Context context) {
if (INSTANCE == null) {
CastConfiguration castConfiguration = new CastConfiguration.Builder(CAST_APP_ID).enableDebug().enableAutoReconnect().enableWifiReconnection().setLaunchOptions(true, Locale.getDefault()).setMediaRouteDialogFactory(ClientConfig.castCallbacks.getMediaRouterDialogFactory()).build();
Log.d(TAG, "New instance of CastManager is created");
if (ConnectionResult.SUCCESS != GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context)) {
Log.e(TAG, "Couldn't find the appropriate version of Google Play Services");
}
INSTANCE = new CastManager(context, castConfiguration);
}
return INSTANCE;
}
Aggregations