Skip to content

Linphone Foreground Service Not Working After Removing App from Background #6

@hirensorathiya2022

Description

@hirensorathiya2022

Description:
When the Linphone app is removed from the background, the foreground service responsible for handling Linphone operations is not starting or resuming as expected. This issue occurs consistently on Android devices, especially Android 11 and above, where restrictions on background service startup are stricter.

Expected Behavior
The Linphone foreground service should start or continue running to handle incoming calls and notifications, even if the app is removed from the background.

Actual Behavior
The foreground service does not start or resume. This results in:

Missed calls or notifications.
Inability to handle ongoing VoIP operations.

Attempts to Resolve
I have already implemented WorkManager to manage the foreground service startup; however, it is still not working when the app is removed from the background. Android's restrictions on background service startups seem to block this behavior despite these attempts.

Relevant Logs or Error Messages
If available, attach any logs or error messages here. For example:

java.lang.IllegalStateException: ForegroundServiceStartNotAllowedException
    at ..

Additional Information
This issue appears to be related to Android's restrictions on background service management introduced in Android 12 (e.g., ForegroundServiceStartNotAllowedException). I have tested partial workarounds such as using WorkManager and handling specific broadcast intents, but these have not resolved the issue. Further investigation is required.

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