GetStream / stream-video-android

📲 Android Video SDK. Stream's versatile Core + Compose UI component libraries that allow you to build video calling, audio room, and, live streaming apps based on Webrtc running on Stream's global edge network.
https://getstream.io/video/docs/android
Other
380 stars 39 forks source link

Incoming call is not showing when screen is locked + notification refactor request #1215

Open Miara opened 1 week ago

Miara commented 1 week ago

Describe the bug whenever I run your demo-app or I use SDK within my app, incoming call notification is not displayed when my phone is locked. I only see sound or vibration, but I don't see phone call activity on locked screen.

SDK version

To Reproduce Steps to reproduce the behavior:

  1. Log in in demo-app as Thierry on deviceA
  2. Log in in demo-app as Tomasso on deviceB
  3. on deviceB lock your device.
  4. Call from Thierry to Tomasso
  5. Vibration is heard, but device screen is still black

Expected behavior Call Activity with incoming call should be shown on the locked screen.

Device: Any device ( I tested on 2 Samsung, one with Android 12, second with Android 9)

solution hint I guess there is something with notification, notification intent or with activity that handles fullscreen intent. I guess that with channel - there is everything OK. Because I tested fake Notification with your channel, and it shows on locked screen. This is the body of notification I tested

NotificationCompat.Builder(applicationContext, CHANNEL_ID_CALLS)
                .setOngoing(true)
                .setSmallIcon(R.drawable.calls_notification_small_icon)
                .setCategory(NotificationCompat.CATEGORY_CALL)
                .setPriority(NotificationCompat.PRIORITY_MAX)
                .setVibrate(VIBRATE_PATTERN)
                .setColor(applicationContext.attributeColor(R.attr.colorPrimary))
                .setContentTitle(applicationContext.getString(R.string.calls_notification_call_incoming))
                .setContentText("User name")
                .addAction(NotificationCompat.Action.Builder(0, applicationContext.getString(R.string.calls_notification_call_incoming_dismiss), rejectIntent).build())
                .addAction(NotificationCompat.Action.Builder(0, applicationContext.getString(R.string.calls_notification_call_incoming_answer), answerIntent).build())
                .setFullScreenIntent(fullScreenIntent, true)
                .setContentIntent(contentIntent)
                .build().apply {
                    flags = Notification.FLAG_INSISTENT
                }
aleksandar-apostolov commented 3 days ago

Hi @Miara

Thanks for the report, we will look into this.

Regards, Alex