Skip to content

Conversation

@WesUnwin
Copy link
Member

@WesUnwin WesUnwin commented Nov 18, 2025

Must be acompannied by the below change to call startForegroundService (over in cordova-plugin-firebasex):
Screenshot from 2025-11-18 12-04-01

This an experiment to see if this would influence how the notifications are shown, by allowing the system to show the notification by using this.startForeground(... notification params ...) in MyConnectionService.

Uses a foreground service of type "FOREGROUND_SERVICE_TYPE_PHONE_CALL"

This promotes the MyConnectionService to a foreground service which will launch the incoming call notification:

Screenshot from 2025-11-18 12-07-14

then transitions/updates the notification to an ongoing call notification

Screenshot from 2025-11-18 12-07-31

then returns the service to the background cancelling the notification:

Screenshot from 2025-11-18 12-07-48

…of type phoneCall, and to start MyConnectionService as a foreground service
@WesUnwin
Copy link
Member Author

Conclusion:

This experiment seems to result in the same behavior (the full screen alert on lock screen works the first time but not the second)

Seems like we should possibly keep this logic though, I like how were using the FOREGROUND_SERVICE_TYPE_PHONE_CALL which seems to imply were supposed to do this

@WesUnwin WesUnwin merged commit 3711bfe into ongoing-call-notification Nov 20, 2025
1 check passed
@rex-iotum rex-iotum deleted the use-foreground-service branch November 21, 2025 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants