iOS:有没有关于Siri出现的通知? [英] iOS: Is there any notification that Siri has appeared?

查看:161
本文介绍了iOS:有没有关于Siri出现的通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望每次Siri出现或从屏幕上消失时都会收到通知。

用户将iPhone放在耳边时可能会出现。

I would like to receive a notification each time Siri appears or disappears from the screen.
It may appear when the user puts the iPhone near his ear.

有可能吗?

推荐答案

我跑了一个测试,当Siri出现时会发送以下通知:

I ran a test and the following notifications are sent when Siri appears:

_UIApplicationWillAddDeactivationReasonNotification
UIApplicationWillResignActiveNotification

...当Siri被解雇时:

... and when Siri is dismissed:

_UIApplicationDidRemoveDeactivationReasonNotification
UIApplicationDidBecomeActiveNotification

所以,不......因为没有公开的Siri API,而且UIApplication没有发送任何特定的Siri通知,现在看来我们运气不好。

So, no... since there isn't a public Siri API, and UIApplication doesn't send any Siri specific notifications, it looks like we're out of luck for now.

这篇关于iOS:有没有关于Siri出现的通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆