识别出该用户呼叫某人
如何识别用户从代码中呼叫某人?(意味着我有一个应用程序并且想要在用户呼叫某人时执行某操作)
how to regognize that user call somebody from code?(means i have an app and want to do sth when user call somebody)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
恐怕你不能这样做,首先,当他们打电话给某人时,你的应用程序将不会运行,其次,你无法从 SDK 访问电话功能。可能可以通过越狱手机上的后台进程来实现。
You can't do that I'm afraid, firstly your app won't be running when they are calling someone and secondly you can't access the phone functions from the SDK. Might be possible with a background process on a jail broken phone.
这是不可能的,无论是通过代码还是通过通知。你无法采取任何措施来阻止这种情况,当有电话打进来时,你的应用程序就会暂停,就像你在 iOS 4 中按下 Home 键一样,如果它已被编程为这样做,它就会执行多任务操作。查看多任务处理的
UIApplication
实现并在那里完成您的工作。This is not possible, not through code nor through notifications. You can't do anything to stop this, when a phonecall comes in, your application gets suspended, like as if you'd press home in iOS 4 and it will multitask if it has been programed to do so. Have a look at the
UIApplication
implementations for multitasking and do your work there.