com.google.android.gms.wearable.ChannelApi.ChannelListener |
![]() |
A listener which will be notified on changes to channels.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Called when a channel is closed.
| |||||||||||
Called when a new channel is opened by a remote node.
| |||||||||||
Called when the input side of a channel is closed.
| |||||||||||
Called when the output side of a channel is closed.
|
Value passed to onChannelClosed(Channel, int, int)
, onInputClosed(Channel, int, int)
and
onOutputClosed(Channel, int, int)
when the closing is due to a remote node being disconnected.
Value passed to onChannelClosed(Channel, int, int)
, onInputClosed(Channel, int, int)
and
onOutputClosed(Channel, int, int)
when the stream is closed due to the local node calling
close(GoogleApiClient)
or close(GoogleApiClient, int)
.
Value passed to onInputClosed(Channel, int, int)
or onOutputClosed(Channel, int, int)
(but not
onChannelClosed(Channel, int, int)
), when the stream was closed under normal conditions, e.g the
whole file was read, or the OutputStream
on the remote node was closed
normally.
Value passed to onChannelClosed(Channel, int, int)
, onInputClosed(Channel, int, int)
and
onOutputClosed(Channel, int, int)
when the stream is closed due to the remote node calling
close(GoogleApiClient)
or close(GoogleApiClient, int)
.
Called when a channel is closed. This can happen through an explicit call to
close(GoogleApiClient)
or close(GoogleApiClient, int)
on
either side of the connection, or due to disconnecting from the remote node.
Parameters | |
---|---|
channel |
Channel
|
closeReason |
int :
the reason for the channel closing. One of
CLOSE_REASON_DISCONNECTED , CLOSE_REASON_REMOTE_CLOSE ,
or CLOSE_REASON_LOCAL_CLOSE . |
appSpecificErrorCode |
int :
the error code specified on close(GoogleApiClient) ,
or 0 if closeReason is CLOSE_REASON_DISCONNECTED .
|
Called when a new channel is opened by a remote node.
Parameters | |
---|---|
channel |
Channel
|
Called when the input side of a channel is closed.
Parameters | |
---|---|
channel |
Channel
|
closeReason |
int :
the reason for the input closing. One of
CLOSE_REASON_DISCONNECTED , CLOSE_REASON_REMOTE_CLOSE ,
CLOSE_REASON_LOCAL_CLOSE , or CLOSE_REASON_NORMAL |
appSpecificErrorCode |
int :
the error code specified on close(GoogleApiClient) ,
or 0 if closeReason is CLOSE_REASON_DISCONNECTED
or CLOSE_REASON_NORMAL .
|
Called when the output side of a channel is closed.
Parameters | |
---|---|
channel |
Channel
|
closeReason |
int :
the reason for the output closing. One of
CLOSE_REASON_DISCONNECTED , CLOSE_REASON_REMOTE_CLOSE ,
CLOSE_REASON_LOCAL_CLOSE , or CLOSE_REASON_NORMAL |
appSpecificErrorCode |
int :
the error code specified on close(GoogleApiClient) ,
or 0 if closeReason is CLOSE_REASON_DISCONNECTED
or CLOSE_REASON_NORMAL .
|