CTCallCenter - Call Event Handler - in background state

后端 未结 3 1640
谎友^
谎友^ 2020-12-03 20:10

Regarding the Apple documentation there is no way to handle the phone state while the app is suspended: https://developer.apple.com/documentation/coretelephony/ctcallcenter<

3条回答
  •  Happy的楠姐
    2020-12-03 20:42

    I know some apps run soundless audio files in the background to prevent from being closed after 10 minutes of inactivity.

    Bluetooth, location, and audio can prevent the app from being completely killed.

    My app is able to detect incoming vs outgoing calls while in background because the app stays alive with location updates. We have used audio/bluetooth in the past.

    Without some method of "keepAlive" the OS will suspend your app until some external stimulus reactivates it (push notification, user launch, etc...)

提交回复
热议问题