How detect incoming and outgoing call end state? iphone

爷,独闯天下 提交于 2019-12-12 07:18:35

问题


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 detect incoming and outgoing call?

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.

Thanks in advance...


回答1:


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];


来源:https://stackoverflow.com/questions/9681475/how-detect-incoming-and-outgoing-call-end-state-iphone

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