Skip to content

Added option to post notification only if the screen is off

Only post notification if the screen is off.

KDEConnect Android pushes every notification for selected app to desktop. Even if the user is using the phone which can be annoying sometimes. This option will prevent it from sending notifications while the device is being used and only send notification to desktop if the screen is off. I've added a toggle for turning this feature on/off.

screenshot

Test Plan

So, to test this we need to an app which will be able to post notifications. I've used this app for my testing purpose. Any other app can be used to.

  1. We test it by posting an instant notification while the device screen is on. It should be posted to the desktop.
  2. Now we go to menu > plugin settings > Notification Sync > Turn on "Send notification only if the screen is off".
  3. We will now repeat step 1. The app should not post any notification to the desktop this time.
  4. Now we schedule a notification after 1 minute. We lock the device and wait for the notification. While the display is off, the notification we have received just now should be shown in desktop.

(Easiest testing method will be just lock the device and ask a friend to send an sms or a message in telegram/whatsapp/messenger 😛 )

Edited by Sourav Das

Merge request reports