Open Miara opened 2 weeks ago
Hi @Miara
Thanks for letting us know. We will look into your suggestion about improving the notification handling. On the other hand we are working on integrating the telecom framework which will handle this part with the service / notification.
Regards, Alex
Business context Before going to the production with GetStream SDK, I need to have some business proof that calls change will be beneficial for users. We have 2 major issues with old implementation. One with Samsung Fold (already reported here ) and this issue with foreground service notification.
Describe the bug Sometimes, when the application is in the background, incoming call is not shown.
It's hard to recreate these restrictions set in natural way, because even when battery optimization is enabled for the specific app, it doesn't mean that it always will throw Exception when trying to start foreground service from the background. You would have to use other apps, and then android system see that you need system resources for other apps, and put your app into deep sleep.
When there is no optimization enabled at all - this bug also appears, but very rarely and it's very hard to reproduce, however on production with many users it appears hundreds times per week.
However don't worry, I have some hacks below 😄
SDK version
To Reproduce Steps to reproduce the behavior:
Thierry
indemo-app
ondeviceA
, and go into the backgrounddeviceA
using adb:deviceA
In logcat
Alex
indemo-app
ondeviceB
and callThierry
deviceA
Expected behavior Incoming push notification should appear on
deviceA
Suggestion regarding solution You could detect whether starting foreground service for incoming call crashes, and then you can use normal push notification (without foreground service), and after clicking on notification and opening the app, you could ensure that foreground service is started - if it wasn't started already.
Device: