Search in sources :

Example 1 with CastConfiguration

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;
}
Also used : BaseCastManager(com.google.android.libraries.cast.companionlibrary.cast.BaseCastManager) CastConfiguration(com.google.android.libraries.cast.companionlibrary.cast.CastConfiguration)

Aggregations

BaseCastManager (com.google.android.libraries.cast.companionlibrary.cast.BaseCastManager)1 CastConfiguration (com.google.android.libraries.cast.companionlibrary.cast.CastConfiguration)1