导致 iPhone 进入待机状态
我正在寻找一个应用程序来取代待机按钮。问题是,我非常彻底地检查了 iPhone API,找到了如何禁用待机状态,但没有找到如何使 iPhone 进入待机状态。我确信一定有办法,毕竟 iPhone 无论如何都会在一段时间后进入待机状态。
I am looking to make an app to replace the standby button. The problem, I've looked over the iPhone API very thoroughly and found how to disable standby but not how to cause the iPhone to go into standby. I'm sure there must be a way, after all the iPhone goes into standby after a time anyway.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不这么认为。允许应用程序进入待机状态很容易被滥用,因为从待机状态唤醒会让您立即回到该应用程序,然后它可能会再次强制进入待机状态。苹果公司往往不允许这样的滥用行为。
I don't think so. Allowing an app to cause standby could easily be abused, as waking from standby would put you right back in the app, upon which it could force a standby again. Apple tends to not allow behaviours that can be abused like this.
可能没有一个应用程序能够禁用待机状态(即视频播放、回合制游戏)的明显原因......
但是,如果您可以将应用程序置于待机状态,那么什么可以阻止您检测到它退出待机状态并将其放回去从而使您必须进行重置或执行其他操作才能退出。除了烦恼/病毒之外,我想不出需要将 iPhone 置于待机状态的原因。
There may not be one there are obvious reasons for an app being able to disable standby i.e. video playback, turn based games...
However if you could put an app into standby whats to stop you detecting it coming out of standby and putting it back in thus making you have to do a reset or something to get out. I can't think of a reason for needing to put the iPhone in standby other than an annoyance/virus.
我确信有一种方法[编辑:Apple 可以做到这一点],但我不确定 Apple 是否通过 API 提供了它。
更多信息此处
I'm sure there's a way [edit: for Apple to do it], but what I am not sure is that Apple made it available through the API.
More info here