本文介绍了如何检测传入和传出呼叫结束状态?苹果手机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要求是应用程序应该在安装后以及拨入或拨出电话时消失,呼叫后不久应该提示并显示屏幕。

I have a requirement that is the app should disappear after install and when incoming or outgoing call, soon after the call the app should prompt and display the screen.

安装后应用程序如何消失?

How disappear app after installation?

如何检测来电和去电?

传入结束后如何显示屏幕和拨打电话?

How display screen after ending of incoming and outgoing call?

主要的是我为个人而不是应用程序商店做这个。所以,如果您有任何想法,请提供完整的建议和想法。

The main thing is that i am making this for personal not of app store. So please if you have any idea about then give full suggestion and ideas.

提前致谢...

推荐答案

使用以下通知查找呼叫状态。添加CoreTelephony.framework

Use following notification to find the call status.Add CoreTelephony.framework

#import <CoreTelephony/CTCall.h>

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callReceived:) name:CTCallStateIncoming object:nil];
   [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callEnded:) name:CTCallStateDisconnected object:nil];
   [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callConnected:) name:CTCallStateConnected object:nil];

这篇关于如何检测传入和传出呼叫结束状态?苹果手机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 06:32