Sunday, August 29, 2010

Working with core telephony framwork



Hi,
from last two days i am working on core Telephony framwork...1st of all i tried with iphone 3gs and i found that there is only 3 methods available..as follows
- (void)applicationWillResignActive:(UIApplication *)application
- (void)applicationDidBecomeActive:(UIApplication *)application
- (void)applicationWillTerminate:(UIApplication *)application
In applicationWillResignActive we can identify incoming call while we working on any application but the thing is that here it will take any inturrupt as a input.for e.g. if we are working on any application and if call comes it will detect it and we can set any pop-up on that but this fails when you set any alarm and if it activate in beetween this it will also generate interupt and also allow pop-up that u defined for detecting incoming calls.
Till iphone 3gs its totally useless to work on this method..here apple is not providing any methods to work on telephone and neither permit to do it by using any external methods.


All the blog publish by erica and others available only shows this three methods but if you have documentation of iphone os4.0 then you found core telephony framwork to work on this.

we have following methods in core telephony framework which with you can work.

You have to include these headers file in your code
1)CTCall.h

in these you found following methods
a)callID property
A unique identifier for the cellular call. (read-only)
b)callState property
The state of the cellular call. (read-only)

2)CTCallCenter.h

a)callEventHandler property
Dispatched when a call changes state.
b)currentCalls property
An array representing the cellular calls in progress. (read-only)

3)CTCarrier.h

a)allowsVOIP property
Indicates if the carrier allows VoIP calls to be made on its network. (read-only)

b)carrierName property
The name of the user’s home cellular service provider. (read-only)

c)isoCountryCode property
The ISO country code for the user’s cellular service provider. (read-only)

d)mobileCountryCode property
The mobile country code (MCC) for the user’s cellular service provider. (read-only)

e)mobileNetworkCode property
The mobile network code (MNC) for the user’s cellular service provider. (read-only)

4)CTTelephonyNetworkInfo.h

a)subscriberCellularProvider property
Information about the user’s cellular service provider. (read-only)

b)subscriberCellularProviderDidUpdateNotifier property
Dispatched when the user’s cellular service provider information changes.


You will find all the details of this methods on developer.apple.com.

--- This blog was written long time back and source code that i have is not compatible with latest SDK, Please do not send request for source code. I know its sound rude but please.:)--

Hope this information is usefull for you people...Happy blogging..

6 comments:

  1. " Dont try this at home"
    Hey, i'm just kidding but the real thing is that this framework is not of any use if you are searching to detect call and want to work with call handling and etc..
    This framwork will only provide information about our own cellular network..when call comes to your iphone you can detect your own information by giving NSlog(@"");
    Just because apple will not allow you to work with their own native application..whenever any call comes to your iphone, the inbuilt native application will get called and it will send all your apps to background even it will not allow you to display your own popups or alerts.
    This is what i got by doing 5 days RnD on this issue..
    Use this framework only when you want to work on VoiP feature.

    ReplyDelete
  2. I have my sample code ready on this, if any one want it kindly send me request on sparshme5@gmail.com or very soon i will try to upload it on blog.

    ReplyDelete
  3. Would be interested to see you Core Telephony example? :)

    ReplyDelete
  4. i want core telephony example app. could you please send it.

    ReplyDelete
  5. Hi Gaurav,
    Thanks for this great Blog that you have posted. I had some queries such as,
    Scenario-
    1. I have an App which does some goody things for me
    2. I call a number
    3. While dialed I want My app to open and Check for the Dialled Number/ detect the dialed number.
    To check for the dialed number . i suppose I have to use the Core.Telelphony.
    You being the Guru, can you please tell me how we can do that ?
    Thanks,
    Aniruddha Kulkarni
    (Punekar :) )

    ReplyDelete
  6. Please send me core telephony framework sample code . send me. email id is sachinbabu.k@gmail.com

    ReplyDelete