首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >GCKDeviceManager协议- didDisconnectWithError:和didDisconnectFromApplicationWithError:?

GCKDeviceManager协议- didDisconnectWithError:和didDisconnectFromApplicationWithError:?
EN

Stack Overflow用户
提问于 2016-03-04 15:51:54
回答 1查看 235关注 0票数 0

Protocol中,我看到了两种非常相似的方法:

代码语言:javascript
复制
/**
 * Called when the connection to the device has been terminated. It is safe to release the
 * GCKDeviceManager object from within this callback.
 *
 * @param deviceManager The device manager.
 * @param error The error that caused the disconnection; nil if there was no error (e.g. intentional
 * disconnection).
 */
- (void)deviceManager:(GCKDeviceManager *)deviceManager
    didDisconnectWithError:(NSError *)error;

代码语言:javascript
复制
/**
 * Called when disconnected from the current application.
 *
 * @param deviceManager The device manager.
 * @param error The error that caused the disconnect, or <code>nil</code> if this was a normal
 * disconnect.
 */
- (void)deviceManager:(GCKDeviceManager *)deviceManager
    didDisconnectFromApplicationWithError:(NSError *)error;

如果Chromecast接收器断开或失去与应用程序的连接,是否调用deviceManager:didDisconnectWithError:?当应用程序试图断开与Chromecast接收器的连接时,deviceManager:didDisconnectFromApplicationWithError:是否调用?

当每个委托方法被调用时,用例是什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-03-04 15:58:12

发送方应用程序可以连接到转换设备,并且在成功连接时,可以在转换设备上启动接收方应用程序。因此,“连接到设备”和“运行应用程序”是两个不同的操作,“停止接收应用程序”和“断开”转换设备也是如此。因此,有这两种不同的方法。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35800293

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档