Search in sources :

Example 6 with BaseCastConsumer

use of com.google.android.libraries.cast.companionlibrary.cast.callbacks.BaseCastConsumer in project Shuttle by timusus.

the class BaseCastManager method onConnectionSuspended.

@Override
public void onConnectionSuspended(int cause) {
    mConnectionSuspended = true;
    LOGD(TAG, "onConnectionSuspended() was called with cause: " + cause);
    for (BaseCastConsumer consumer : mBaseCastConsumers) {
        consumer.onConnectionSuspended(cause);
    }
}
Also used : BaseCastConsumer(com.google.android.libraries.cast.companionlibrary.cast.callbacks.BaseCastConsumer)

Example 7 with BaseCastConsumer

use of com.google.android.libraries.cast.companionlibrary.cast.callbacks.BaseCastConsumer in project Shuttle by timusus.

the class BaseCastManager method onDisconnected.

/*
     * Note: this is not called by the SDK anymore but this library calls this in the appropriate
     * time.
     */
protected void onDisconnected(boolean stopAppOnExit, boolean clearPersistedConnectionData, boolean setDefaultRoute) {
    LOGD(TAG, "onDisconnected() reached");
    mDeviceName = null;
    for (BaseCastConsumer consumer : mBaseCastConsumers) {
        consumer.onDisconnected();
    }
}
Also used : BaseCastConsumer(com.google.android.libraries.cast.companionlibrary.cast.callbacks.BaseCastConsumer)

Example 8 with BaseCastConsumer

use of com.google.android.libraries.cast.companionlibrary.cast.callbacks.BaseCastConsumer in project zype-android by zype.

the class BaseCastManager method onConnectionFailed.

/*
     * (non-Javadoc)
     * @see com.google.android.gms.GoogleApiClient.OnConnectionFailedListener#
     * onConnectionFailed(com.google.android.gms.common.ConnectionResult)
     */
@Override
public void onConnectionFailed(ConnectionResult result) {
    LOGD(TAG, "onConnectionFailed() reached, error code: " + result.getErrorCode() + ", reason: " + result.toString());
    disconnectDevice(mDestroyOnDisconnect, false, /* clearPersistentConnectionData */
    false);
    mConnectionSuspended = false;
    if (mMediaRouter != null) {
        mMediaRouter.selectRoute(mMediaRouter.getDefaultRoute());
    }
    for (BaseCastConsumer consumer : mBaseCastConsumers) {
        consumer.onConnectionFailed(result);
    }
}
Also used : BaseCastConsumer(com.google.android.libraries.cast.companionlibrary.cast.callbacks.BaseCastConsumer)

Example 9 with BaseCastConsumer

use of com.google.android.libraries.cast.companionlibrary.cast.callbacks.BaseCastConsumer in project zype-android by zype.

the class BaseCastManager method onDisconnected.

/*
     * Note: this is not called by the SDK anymore but this library calls this in the appropriate
     * time.
     */
protected void onDisconnected(boolean stopAppOnExit, boolean clearPersistedConnectionData, boolean setDefaultRoute) {
    LOGD(TAG, "onDisconnected() reached");
    mDeviceName = null;
    for (BaseCastConsumer consumer : mBaseCastConsumers) {
        consumer.onDisconnected();
    }
}
Also used : BaseCastConsumer(com.google.android.libraries.cast.companionlibrary.cast.callbacks.BaseCastConsumer)

Example 10 with BaseCastConsumer

use of com.google.android.libraries.cast.companionlibrary.cast.callbacks.BaseCastConsumer in project zype-android by zype.

the class BaseCastManager method onConnectionSuspended.

@Override
public void onConnectionSuspended(int cause) {
    mConnectionSuspended = true;
    LOGD(TAG, "onConnectionSuspended() was called with cause: " + cause);
    for (BaseCastConsumer consumer : mBaseCastConsumers) {
        consumer.onConnectionSuspended(cause);
    }
}
Also used : BaseCastConsumer(com.google.android.libraries.cast.companionlibrary.cast.callbacks.BaseCastConsumer)

Aggregations

BaseCastConsumer (com.google.android.libraries.cast.companionlibrary.cast.callbacks.BaseCastConsumer)11 IOException (java.io.IOException)2 PendingIntent (android.app.PendingIntent)1 NoConnectionException (com.google.android.libraries.cast.companionlibrary.cast.exceptions.NoConnectionException)1 TransientNetworkDisconnectionException (com.google.android.libraries.cast.companionlibrary.cast.exceptions.TransientNetworkDisconnectionException)1