callkeep icon indicating copy to clipboard operation
callkeep copied to clipboard

startForeground in Android 14 is causing fatal exception

Open janhelwich opened this issue 1 year ago • 0 comments

Here the out from crashlytics:

Fatal Exception: android.app.MissingForegroundServiceTypeException Starting FGS without a type callerApp=ProcessRecord{646d0e3 7546:de.telemarie.family/u0a207} targetSDK=34

android.app.IActivityManager$Stub$Proxy.setServiceForeground (IActivityManager.java:7234) android.app.Service.startForeground (Service.java:775) io.wazo.callkeep.VoiceConnectionService.startForegroundService (VoiceConnectionService.java:252) io.wazo.callkeep.VoiceConnectionService.onCreateIncomingConnection (VoiceConnectionService.java:139) android.telecom.ConnectionService.createConnection (ConnectionService.java:2399)

Here the (new?) requirements regarding manifests etc: https://developer.android.com/about/versions/14/changes/fgs-types-required#phone-call

Most of it is configurable but there seems to be requirement to add [FOREGROUND_SERVICE_TYPE_PHONE_CALL] to the startForegorund call.

janhelwich avatar Jul 27 '24 11:07 janhelwich