2014-01-28 32 views
-1

首先,在我的應用程序中,我註冊了一個手機號碼之後,如果在該電話結束後從該手機號碼接到呼叫,我想打開該應用程序(最初的應用程序未啓動)或我想在屏幕上顯示一個按鈕。 這是可能在iOS?在我從iPhone收到特定號碼的電話後啓動應用程序

如果可能的話給我一些想法來啓動這個應用程序。

謝謝。

回答

1

你不能那樣做。你可以檢查的是CTCallCenter.currentCalls 然而這隻會給你提供信息,如果實際上有一個電話。 沒有官方API與手機進行交互,並且深入挖掘。

另請注意,如果收到呼叫,您的應用程序將被推送到後臺,不再是活動的應用程序。

0

通過這個CoreTelephony FrameworkCTCall類提供有關呼叫狀態的信息。

extern NSString const *CTCallStateDialing; 
extern NSString const *CTCallStateIncoming; 
extern NSString const *CTCallStateConnected; 
extern NSString const *CTCallStateDisconnected; 

CTCallCenter

keep in mind that if you kill your app from the app switcher (i.e. swiping up to kill the app) then the OS will never relaunch the app regardless of push notification or background fetch. In this case the user has to manually relaunch the app once and then from that point forward the background activities will be invoked

+0

Thaks爲ü閱讀答題。我想啓動應用程序並將消息發送給呼叫我的用戶。可能嗎? – iSuresh

相關問題