Protocolo <GCKDeviceManagerDelegate>
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
O protocolo delegado GCKDeviceManager.
A menos que indicado de outra forma, o autor da chamada não deve liberar o objeto GCKDeviceManager de delegação de um método delegado.
Herda <NSObjectNSObject>.
Chamado quando uma conexão é estabelecida com o dispositivo.
- Parameters
-
deviceManager | The device manager. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didFailToConnectWithError: |
|
(NSError *) |
error |
|
|
| |
|
optional |
Chamado quando a conexão com o dispositivo falha.
É seguro liberar o objeto GCKDeviceManager de dentro desse callback.
- Parameters
-
deviceManager | The device manager. |
error | The error that caused the connection to fail. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didDisconnectWithError: |
|
(NSError *__nullable) |
error |
|
|
| |
|
optional |
Chamado quando a conexão com o dispositivo é encerrada.
É seguro liberar o objeto GCKDeviceManager de dentro desse callback.
- Parameters
-
deviceManager | The device manager. |
error | The error that caused the disconnection; nil if there was no error (for example, an intentional disconnect). |
Chamado quando a conexão com o dispositivo foi suspensa, possivelmente de forma temporária.
Quando uma conexão é suspensa, o gerenciador de dispositivos tenta restabelecer a conexão automaticamente no momento adequado. O aplicativo de chamadas não deve tentar forçar uma reconexão por conta própria.
- Parameters
-
deviceManager | The device manager. |
reason | The reason for the suspension. |
- (void) deviceManagerDidResumeConnection: |
|
(GCKDeviceManager *) |
deviceManager |
rejoinedApplication: |
|
(BOOL) |
rejoinedApplication |
|
|
| |
|
optional |
Chamado quando uma conexão de dispositivo suspensa anteriormente é restabelecida.
- 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 |
Chamado quando um aplicativo é iniciado ou acessado.
- 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 |
Chamado quando a conexão com um aplicativo falha.
- Parameters
-
deviceManager | The device manager. |
error | The error that caused the failure. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didDisconnectFromApplicationWithError: |
|
(NSError *__nullable) |
error |
|
|
| |
|
optional |
Chamado quando desconectado do aplicativo atual.
- Parameters
-
deviceManager | The device manager. |
error | The error that caused the disconnect, or nil if this was a normal disconnect. |
Chamado quando uma solicitação de interrupção do aplicativo é concluída.
- Parameters
-
deviceManager | The device manager. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didFailToStopApplicationWithError: |
|
(NSError *) |
error |
|
|
| |
|
optional |
Chamado quando uma solicitação de interrupção do aplicativo falha.
- Parameters
-
deviceManager | The device manager. |
error | The error that caused the failure. |
Chamado sempre que os metadados do aplicativo em execução mudam.
- 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 |
Chamado sempre que o texto de status do aplicativo em execução muda.
- 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 |
Chamado sempre que o volume muda.
- Parameters
-
deviceManager | The device manager. |
volumeLevel | The current device volume level. |
isMuted | The current device mute state. |
Chamado sempre que o status de entrada ativa muda.
- Parameters
-
deviceManager | The device manager. |
activeInputStatus | The active input status. |
Chamado sempre que o status de espera muda.
- Parameters
-
deviceManager | The device manager. |
standbyStatus | The standby status. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
request: |
|
(NSInteger) |
requestID |
didFailWithError: |
|
(NSError *) |
error |
|
|
| |
|
optional |
Chamado quando uma operação assíncrona falha.
- Parameters
-
deviceManager | The device manager. |
requestID | The ID of the request that failed. |
error | The error. |
Chamado quando uma conexão do modo visitante é estabelecida com o dispositivo.
- Parameters
-
deviceManager | The device manager. |
guestModeDevice | The device object for the concrete guest mode device. |
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-07-26 UTC.
[null,null,["Última atualização 2025-07-26 UTC."],[],["The `GCKDeviceManagerDelegate` protocol manages interactions with Cast devices. Key actions include handling device connections (successful or failed), disconnections, and suspensions. It manages application connections, launches, failures, and disconnections. It also reports changes in application metadata, status text, volume, active input, and standby status. Additionally, it notifies when application stop requests succeed or fail, when an asynchronous operation fails and when a guest mode connection is established. The delegating object should not be released from within most delegate methods.\n"],null,[]]