nextcloud / talk-android

📱😀 Video & audio calls through Nextcloud on Android
Other
550 stars 248 forks source link

Too short notification, when screen is locked #2763

Open pawlosck opened 1 year ago

pawlosck commented 1 year ago

Steps to reproduce

Screen is locked: password Sounds is off. Vibration is on.

  1. Call from web Talk app

Expected behaviour

Notification (vibration) should take longer. One minute or longer. Nextcloud Talk screen should be visible to start or reject connection.

Actual behaviour

I hear only one or two vibrations. Screen is on for few seconds. Lock screen is visible -> field to enter password

Device brand and model

Samsung Galaxy s8

Android version

9

Nextcloud Talk app version

15.1.1

Nextcloud server version

25.0.1

Talk version

15.0.3

Custom Signaling server configured

None

Custom TURN server configured

Yes

Custom STUN server configured

Yes

Android logs

No response

Server log

No response

Additional information

No response

mahibi commented 1 year ago

i can't reproduce this right now. tested with: redmi note 7, android 10 galaxy S20FE, galaxy A32, both android 13

does it make a difference if you have other options for Sounds and Vibration?

pawlosck commented 1 year ago

I checked:

  1. No sounds, vibration on, lock screen on -> bug
  2. Sounds on, vibration on, lock screen on -> bug
  3. No sounds, vibration on, lock screen off -> bug (first call when lock screen off)
  4. No sounds, vibration on, lock screen off -> no bug (second and next calls)
  5. no sounds, vibration on, lock screen on -> no bug (first call when lock screen on)
  6. no sounds, vibration on, lock screen on -> bug (second and next calls)

Few minutes ago, I installed latest version of Android app: 15.1.2 and now it looks strange

  1. bug from this issue -> visible only few times
  2. no bug - visible android app screen EDIT: 3. completely no notification -> I am no sure, but it's probably caused by no answer from first unanswered call or when I am trying too fast next recall (join call button is still visible).

I am not sure is it important, but I am using password for nextcloud app too.

I have to check tomorrow, because in the past, I had case when currently Talk is working correctly, but after few hours no notifications when I tried to call. I couldn't touch the phone and use it.

pawlosck commented 1 year ago

I found one case when lock screen is on when I am trying to call. It happen when I restart phone and I will not unlock phone. I can reproduce it 100/100. When I unlock first time, then starts problems like I described in this issue.

mahibi commented 1 year ago

i still can't reproduce on my devices and on emulator. also after restart the screen (CallNotificationActivity) appear and stays when called. currently the call notification screen is shown as long as the android notification is active. This is checked every second. When the android notification is gone, the CallNotificationActivity will finish.

val notificationHandler = Handler(Looper.getMainLooper())
notificationHandler.post(object : Runnable {
    override fun run() {
        if (NotificationUtils.isNotificationVisible(context, notificationTimestamp!!.toInt())) {
            notificationHandler.postDelayed(this, 1000)
        } else {
            finish()
        }
    }
})

https://github.com/nextcloud/talk-android/blob/master/app/src/main/java/com/nextcloud/talk/activities/CallNotificationActivity.kt#L260

Maybe there is something wrong with this approach under certain circumstances. Your bug description "Too short notification" sounds like the android notification is gone somehow after a short time which would also end the CallNotificationActivity.

Regarding "completely no notification": Please check https://github.com/nextcloud/talk-android/blob/master/docs/notifications.md Does this help?

elpeh commented 1 year ago

With Talk App 17.0.0 (not tested earlier) on Galaxy S20 FE (latest Android 13) there seem to be two primarily problematic aspects while the phone is lock

Strange behaviour - but makes it almost unusable, I'm afraid.

Thanks for your work.

pawlosck commented 1 year ago

Regarding "completely no notification": Please check https://github.com/nextcloud/talk-android/blob/master/docs/notifications.md Does this help?

I checked it and it didn't help. Currently, I have: Talk (Android): 17 Nextcloud server 26.0.2 Talk (web app): 16.0.4

I thought, problem is related to old Android, but if I understand @elpeh well, problem is with latest android too.