Protocolo <GCKDeviceManagerDelegate>
El protocolo delegado GCKDeviceManager.
A menos que se indique lo contrario, el emisor no debe liberar el objeto delegado GCKDeviceManager desde un método delegado.
Hereda <NSObjectNSObject>.
Se llama cuando se establece una conexión con el dispositivo.
- Parameters
-
deviceManager | The device manager. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didFailToConnectWithError: |
|
(NSError *) |
error |
|
|
| |
|
optional |
Se llama cuando falla la conexión con el dispositivo.
Es seguro liberar el objeto GCKDeviceManager desde esta devolución de llamada.
- Parameters
-
deviceManager | The device manager. |
error | The error that caused the connection to fail. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didDisconnectWithError: |
|
(NSError *__nullable) |
error |
|
|
| |
|
optional |
Se lo llama cuando finaliza la conexión con el dispositivo.
Es seguro liberar el objeto GCKDeviceManager desde esta devolución de llamada.
- Parameters
-
deviceManager | The device manager. |
error | The error that caused the disconnection; nil if there was no error (for example, an intentional disconnect). |
Se llama cuando se suspende la conexión con el dispositivo, posiblemente de forma temporal.
Cuando se suspende una conexión, el administrador de dispositivos intenta automáticamente restablecerla en el momento indicado. La aplicación que realiza la llamada no debe intentar forzar una reconexión.
- Parameters
-
deviceManager | The device manager. |
reason | The reason for the suspension. |
- (void) deviceManagerDidResumeConnection: |
|
(GCKDeviceManager *) |
deviceManager |
rejoinedApplication: |
|
(BOOL) |
rejoinedApplication |
|
|
| |
|
optional |
Se llama cuando se restablece una conexión de dispositivo suspendida anteriormente.
- Parameters
-
deviceManager | The device manager. |
rejoinedApplication | If a connection had been established to a receiver application at the time of the suspension, this flag indicates whether that application has been successfully re-joined. This value would be NO if, for example, the application was terminated during the time that the device manager was attempting to re-establish its connection to the device. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didConnectToCastApplication: |
|
(GCKApplicationMetadata *) |
applicationMetadata |
sessionID: |
|
(NSString *) |
sessionID |
launchedApplication: |
|
(BOOL) |
launchedApplication |
|
|
| |
|
optional |
Se llama cuando se inicia una aplicación o se une a ella.
- Parameters
-
deviceManager | The device manager. |
applicationMetadata | Metadata about the application. |
sessionID | The current application session ID that is active on the receiver. |
launchedApplication | YES if the application was launched as part of the connection, or NO if the application was already running and was joined. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didFailToConnectToApplicationWithError: |
|
(NSError *) |
error |
|
|
| |
|
optional |
Se llama cuando falla la conexión a una aplicación.
- Parameters
-
deviceManager | The device manager. |
error | The error that caused the failure. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didDisconnectFromApplicationWithError: |
|
(NSError *__nullable) |
error |
|
|
| |
|
optional |
Se llama cuando se desconecta de la aplicación actual.
- Parameters
-
deviceManager | The device manager. |
error | The error that caused the disconnect, or nil if this was a normal disconnect. |
Se llama cuando la solicitud de detención se completa con éxito.
- Parameters
-
deviceManager | The device manager. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didFailToStopApplicationWithError: |
|
(NSError *) |
error |
|
|
| |
|
optional |
Se llama cuando falla una solicitud de detención de una aplicación.
- Parameters
-
deviceManager | The device manager. |
error | The error that caused the failure. |
Se llama cada vez que cambian los metadatos de la aplicación que se encuentra en ejecución.
- Parameters
-
deviceManager | The device manager. |
metadata | The application metadata. May be nil if no application is currently running. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didReceiveApplicationStatusText: |
|
(NSString *__nullable) |
applicationStatusText |
|
|
| |
|
optional |
Se llama cada vez que cambia el texto de estado de la aplicación en ejecución.
- Parameters
-
deviceManager | The device manager. |
applicationStatusText | The application status text. May be nil if no application is currently running or if the application did not report any status text. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
volumeDidChangeToLevel: |
|
(float) |
volumeLevel |
isMuted: |
|
(BOOL) |
isMuted |
|
|
| |
|
optional |
Se llama cada vez que cambia el volumen.
- Parameters
-
deviceManager | The device manager. |
volumeLevel | The current device volume level. |
isMuted | The current device mute state. |
Se llama cada vez que cambia el estado de la entrada activa.
- Parameters
-
deviceManager | The device manager. |
activeInputStatus | The active input status. |
Se llama cada vez que cambia el estado de espera.
- Parameters
-
deviceManager | The device manager. |
standbyStatus | The standby status. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
request: |
|
(NSInteger) |
requestID |
didFailWithError: |
|
(NSError *) |
error |
|
|
| |
|
optional |
Se llama cuando falla una operación asíncrona.
- Parameters
-
deviceManager | The device manager. |
requestID | The ID of the request that failed. |
error | The error. |
Se llama cuando se establece una conexión en modo de invitado en el dispositivo.
- Parameters
-
deviceManager | The device manager. |
guestModeDevice | The device object for the concrete guest mode device. |
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2022-12-06 (UTC)
[null,null,["Última actualización: 2022-12-06 (UTC)"],[[["The `GCKDeviceManagerDelegate` protocol defines methods that inform your app about the status of Cast devices and Cast sessions."],["These methods provide notifications for connections, disconnections, application launches, volume changes, and errors."],["Your app should implement this protocol to handle Cast-related events."],["The delegate methods are called on the main thread."],["It is important to note that unless specified, the `GCKDeviceManager` object should not be released from within a delegate method."]]],[]]