linphone-android
linphone-android copied to clipboard
Call ringing but no notification displayed (black screen)
Hi,
I don't know if this has something to do with the other "black screen" issues since I'm using a Samsung device.
- Describe the bug (mandatory)
Sometimes Linphone gets into a state where incoming calls are ringing, but no call notification is displayed. Even when having Linphone in the foregrond, I'm unable to pickup the call. I've enabled the improved bluetooth interaction (TelecomManager).
I'm also noticing "WARNING [Notifications Manager] No service found, waiting for it to start" in the logs during the event. I think Linphone might be waiting for the service to come up, but it is never launched.
"Appear on top" Android setting is enabled.
- To Reproduce (mandatory) Happens regularly after a few calls. Sometimes I can go back to the incoming call activity by opening Linphone, swiping it away from recents and relaunching it.
EDIT: Receive an incoming all with notification. Answer/hangup the call Swipe Linphone from recents Retrieve another call (device can be unlocked) -> no notification is shown but ringtone is heard When call has ended (caller hangs up), missed called notification is shown.
-
Expected behavior (mandatory) Should display the incoming call notification when ringing.
-
Please complete the following information (mandatory)
- Device: Samsung XCover 5
- OS: Android 12
- Linphone 4.7.0
- 5.2.0-alpha.257+ac38c34
- local build
- Stock android
This issue also occurs with the latest official Android 4.7.0-alpha.365+a08e447d3 snapshot.
Hi,
So I've done some more testing and it looks like reverting a few changes makes this more reliable:
override fun onCallStateChanged(
core: Core,
call: Call,
state: Call.State,
message: String
) {
Log.i("[Notifications Manager] Call state changed [$state]")
if (corePreferences.preventInterfaceFromShowingUp) {
Log.w("[Notifications Manager] We were asked to not show the call notifications")
return
}
when (call.state) {
/* ******* REVERTED CHANGES ******* */
/*
Call.State.IncomingEarlyMedia, Call.State.IncomingReceived -> {
if (service != null) {
Log.i("[Notifications Manager] Service isn't null, show incoming call notification")
displayIncomingCallNotification(call, false)
} else {
Log.w("[Notifications Manager] No service found, waiting for it to start")
}
}
*/
Call.State.IncomingEarlyMedia, Call.State.IncomingReceived -> {
displayIncomingCallNotification(call, false)
}
Call.State.End, Call.State.Error -> dismissCallNotification(call)
Call.State.Released -> {
if (LinphoneUtils.isCallLogMissed(call.callLog)) {
displayMissedCallNotification(call.remoteAddress)
}
}
else -> displayCallNotification(call)
}
}
Hi @driesken,
Thanks for the info, I have an idea of what could happen. I'm still on holidays but I'll try to find a way to fix that next week.
Cheers,
Hi @driesken,
Actually it was not what I was thinking. In your latest log file (the one using 4.7.0-alpha version), can you tell me which call has the issue please?
Hi @Viish
I think it was the one with call ID fe1b0e02-835c-4c5a-9fa8-cc643d133af8 (2022-08-05 08:41:36). I might have stopped the call attemps as soon as I had noticed the issue. Since I was unable to answer the call with Linphone, it resulted in a missed call.
Thanks @driesken
Can you try commit 6935bbb1f34594da2fe686942ed515210ba6b24f and tell me if it fixes your issue please? Edit: My bad, use 6935bbb1f34594da2fe686942ed515210ba6b24f (or fix/incoming_call_notif_service branch).
Sure @Viish , thank you for implementing that fix. Is it okay if I'll provide you some feedback in the following days?
Of course. Thanks @driesken !
Hi @Viish I've done some testing the last few days and I haven't noticed the problem anymore. Thanks for fixing!
Perfect, I'll merge the fix into master. Thanks for your help !