Skip to content

startForeground in Android 14 is causing fatal exception #187

@janhelwich

Description

@janhelwich

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions