How to detect whether iPhone is vibrating or not?

岁酱吖の 提交于 2019-12-11 20:16:36

问题


I want to write an app that does something whenever the iPhone vibrates (receives phone call, text on vibrate mode). Is there anyway to detect whether the iPhone is vibrating (i.e. handle a "vibrate" event)? Thanks for the help!


回答1:


Well i don't think so that Apple give so much liberty but still you can look here for a good discussion on this topic Detecting the iPhone's Ring / Silent / Mute switch using AVAudioPlayer not working?




回答2:


No. You don't have access to any API that does this. Out of interest, why would you want to?



来源:https://stackoverflow.com/questions/13526585/how-to-detect-whether-iphone-is-vibrating-or-not

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