Bug 457181 - KDE Connect android app does not push all notifications to desktop
Summary: KDE Connect android app does not push all notifications to desktop
Status: REPORTED
Alias: None
Product: kdeconnect
Classification: Applications
Component: android-application (show other bugs)
Version: unspecified
Platform: Android Unspecified
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-27 03:57 UTC by chemistudio@gmail.com
Modified: 2022-07-27 03:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chemistudio@gmail.com 2022-07-27 03:57:28 UTC
SUMMARY
It is a well-known inconvenience of KDE Connect android app. Some apps, for example, [wechat](https://weixin.qq.com) notifications are not pushed to desktop. The notifications appear at the phone side and nothing happened on desktop side.

The code is in NotificationsPlugin.java, line #192. For some reason, those notifications are with flag FLAG_LOCAL_ONLY, so that KDE Connect android app filters them off.
```java
        if ((notification.flags & Notification.FLAG_FOREGROUND_SERVICE) != 0
                || (notification.flags & Notification.FLAG_ONGOING_EVENT) != 0
                || (notification.flags & Notification.FLAG_LOCAL_ONLY) != 0
                || (notification.flags & NotificationCompat.FLAG_GROUP_SUMMARY) != 0 //The notification that groups other notifications
        )
        {
            //This is not a notification we want!
            return;
        }
```

The workaround is remove line #192, and recompile the app from source.

STEPS TO REPRODUCE
1. Install and configure KDE Connect android app.
2. Some notifications of phone apps popped up, and nothing happened to desktop KDE Connect or gsconnect.

OBSERVED RESULT
Notifications with FLAG_LOCAL_ONLY are not pushed to desktop.

EXPECTED RESULT
Notifications with FLAG_LOCAL_ONLY should be pushed to desktop, or leave the choice to the user whether they should be pushed.