开发者

Accessing the number of an incoming call on iPhone

Assuming a jailbroken iPhone, how can I discover the number of an incoming call programmatica开发者_如何学编程lly? And how can I access the call logs?


There is quite a good post about file locations on the jailbroken device at this page: http://www.ihackintosh.com/2009/07/manually-backup-iphone-contacts-sms/

They use it as backup but I assume you can easily use SQLite to get content from it.


Try using the following observer to find the incoming call event:

id ct = CTTelephonyCenterGetDefault();
CTTelephonyCenterAddObserver(ct, NULL, callback, NULL, NULL, CFNotificationSuspensionBehaviorHold);

and then base on the type: kCTCallStatusChangeNotification and using this function CTCallCopyAddress you will be able to get the caller ID.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜