core-telephony

Capture incoming Callevent using coretelephony?

假装没事ソ 提交于 2020-01-14 04:39:08
问题 I want to create an application for jailbroken iphone (ios 4.0 or greater). I want my application to remain running and whenever my phone starts ringing (for an incoming call), my application should be able to capture that "call incoming" event and based on that i could perform some function e.g. lower speaker volume. Can anyone guide me to the right direction, as to how can i capture such event, or if it is available in private coretelephony framework ? 回答1: Are you sure you want to monitor

Detect phone calls on iOS with CTCallCenter (Swift)

对着背影说爱祢 提交于 2019-12-30 08:36:33
问题 I wanted to try to detect incoming phone calls in my app. I created a new Swift project from scratch just to try some code. The only thing I did was importing CoreTelephony in the ViewController that is created with every new project and I also changed the viewDidLoad() to: super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. let callCenter = CTCallCenter() NSLog("start") callCenter.callEventHandler = {[weak self] (call: CTCall) -> () in self?.label

Using CFNotificationCallback in Swift, or, @convention(c) blocks in Swift

梦想的初衷 提交于 2019-12-29 08:18:10
问题 I am trying to listen to CoreTelephony notifications using the (now private) CTTelephonyCenterAddObserver C function and CFNotificationCallback callback blocks. My bridging header (to extern the private C functions): #include <CoreFoundation/CoreFoundation.h> #if __cplusplus extern "C" { #endif #pragma mark - API /* This API is a mimic of CFNotificationCenter. */ CFNotificationCenterRef CTTelephonyCenterGetDefault(); void CTTelephonyCenterAddObserver(CFNotificationCenterRef center, const void

Does CTCarrier mobileNetworkCode change when roaming?

Deadly 提交于 2019-12-29 05:22:13
问题 The documentation states for CTCarrier's carrierName "The value does not change if the user is roaming; it always represents the provider with whom the user has an account." It does not say the same about mobileNetworkCode however. Does this change based on the current carrier or does it remain constant too? I am trying find if the phone is roaming in a startMonitoringSignificantLocationChanges callback so would like to avoid geolocating. 回答1: I'm roaming right now - in Switzerland on an AT&T

How to create auto dialer in iPhone using MonoTouch?

百般思念 提交于 2019-12-25 08:04:19
问题 I need to create button to call one contact number, that number is the default number and I will mention that number in button click event. When I click on button need to dial that number in iPhone using MonoTouch. 回答1: UIApplication.SharedApplication.OpenUrl(NSUrl.FromString("tel://1234567890")); 来源: https://stackoverflow.com/questions/8080810/how-to-create-auto-dialer-in-iphone-using-monotouch

Saving contact to sim card programmatically in iOS7

我的梦境 提交于 2019-12-25 06:36:55
问题 Can we save contact to sim card programmatically in iOS7. i Google it a lot but didn't find any topic. 回答1: Not possible. The closest you will get to that is using the Address book framework. https://developer.apple.com/library/ios/documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/Introduction.html#//apple_ref/doc/uid/TP40007744 回答2: You cant do that . AddressBook Api is for accessing (read/write) the contacts which stored in iPhone . There is no way to access the sim

Disconnect call programmatically in iOS7

不羁的心 提交于 2019-12-24 16:25:03
问题 I want to disconnect a phone call programatically in iOS7 . I know we can programmatically handle the interruptions for Incoming calls, SMS etc. on iPhone (without Appstore). I have to create a launch daemon to get notifications as CTCallCenter doesn't deliver the notifications to UIApplications in the background as explained by Nate in his Answer. Nate 's comments shows there is some scope of disconnecting certain calls on an iPhone using the launch daemon (without Appstore). So, My first

iOS make phone call

坚强是说给别人听的谎言 提交于 2019-12-24 00:36:45
问题 I am able to make a phone call by using void CTCallDialWithID(NSString *numberToDial); but my goal is to not have any ui visible and somehow hide the call ui screen. Any ideas how this could be achieved? This should work on Jailbreak devices !(I am not targeting non jailbreak devices ) 来源: https://stackoverflow.com/questions/17441353/ios-make-phone-call

Retrieving Current Time from Carrier in iPhone

北城余情 提交于 2019-12-23 13:58:22
问题 Is there is any way to get the current time from the Carrier. Like Auto Update time, Even if the Auto Update of time is Off from settings. Even if the Internet connection is not available. 回答1: Maybe take a look at iOS-NTP Project. I have not personally used it, but looks like an option if auto-update is not set and you want the right(NTP) time. 来源: https://stackoverflow.com/questions/14134986/retrieving-current-time-from-carrier-in-iphone

Getting carrier's name with CoreTelephony returns just “Carrier”

六眼飞鱼酱① 提交于 2019-12-23 07:26:40
问题 I tried getting carrier name with this code (using CoreTelephony): CTTelephonyNetworkInfo *netinfo = [[CTTelephonyNetworkInfo alloc] init]; CTCarrier *carrier = [netinfo subscriberCellularProvider]; NSLog(@"Carrier Name: %@", [carrier carrierName]); It returns "Carrier". If i go to iPhone settings my carrier's name is correct there. My iOS on the phone is v4.2.1. What am i doing wrong? 回答1: Do you really get string "Carrier" or is the string empty ? Documentation says: The value for this