Can Siri be disabled within an app?

独自空忆成欢 提交于 2019-12-05 10:07:20

问题


I'm working an on iOS game and recently tested on an iPhone 4S. Siri activates sometimes when my thumb covers the proximity sensor. This is a feature of the 4S. Instead of holding the home button, users can put the phone to their ear to activate Siri. But in my game the activation is not intended and it interrupts gameplay.

Can Siri be disabled within an app? Is this an iPhone 4S bug?


回答1:


Apple deprecated support for this.

http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIApplication_Class/DeprecationAppendix/AppendixADeprecatedAPI.html#//apple_ref/occ/instp/UIApplication/proximitySensingEnabled

I'd file a bug report.

Discussion YES if proximity sensing is enabled; otherwise NO. Enabling proximity sensing tells iOS that it may need to blank the screen if the user's face is near it. Proximity sensing is disabled by default.

This the replacement which only allows you to get notification, not disable it.

Discussion Enable proximity monitoring only when your application needs to be notified of changes to the proximity state. Otherwise, disable proximity monitoring. The default value is NO.

http://developer.apple.com/library/ios/DOCUMENTATION/UIKit/Reference/UIDevice_Class/Reference/UIDevice.html#//apple_ref/doc/uid/TP40006902-CH3-SW25




回答2:


Setting :

[UIDevice currentDevice].proximityMonitoringEnabled = YES; 

Disables Siri from activating when you activate the proximity sensor. As a result although, it blacks out the screen when the proximity sensor is activated instead.



来源:https://stackoverflow.com/questions/7881167/can-siri-be-disabled-within-an-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!