Differential D17786 Diff 48162 src/org/kde/kdeconnect/Plugins/ReceiveNotificationsPlugin/ReceiveNotificationsPlugin.java
Changeset View
Changeset View
Standalone View
Standalone View
src/org/kde/kdeconnect/Plugins/ReceiveNotificationsPlugin/ReceiveNotificationsPlugin.java
Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Line(s) | 108 | Notification noti = new NotificationCompat.Builder(context, NotificationHelper.Channels.DEFAULT) | |||
---|---|---|---|---|---|
110 | .setContentText(np.getString("ticker")) | 110 | .setContentText(np.getString("ticker")) | ||
111 | .setContentIntent(resultPendingIntent) | 111 | .setContentIntent(resultPendingIntent) | ||
112 | .setTicker(np.getString("ticker")) | 112 | .setTicker(np.getString("ticker")) | ||
113 | .setSmallIcon(R.drawable.ic_notification) | 113 | .setSmallIcon(R.drawable.ic_notification) | ||
114 | .setLargeIcon(largeIcon) | 114 | .setLargeIcon(largeIcon) | ||
115 | .setAutoCancel(true) | 115 | .setAutoCancel(true) | ||
116 | .setLocalOnly(true) // to avoid bouncing the notification back to other kdeconnect nodes | 116 | .setLocalOnly(true) // to avoid bouncing the notification back to other kdeconnect nodes | ||
117 | .setDefaults(Notification.DEFAULT_ALL) | 117 | .setDefaults(Notification.DEFAULT_ALL) | ||
118 | .setStyle(new NotificationCompat.BigTextStyle().bigText(np.getString("ticker"))) | ||||
118 | .build(); | 119 | .build(); | ||
119 | 120 | | |||
120 | NotificationHelper.notifyCompat(notificationManager, "kdeconnectId:" + np.getString("id", "0"), np.getInt("id", 0), noti); | 121 | NotificationHelper.notifyCompat(notificationManager, "kdeconnectId:" + np.getString("id", "0"), np.getInt("id", 0), noti); | ||
121 | 122 | | |||
122 | return true; | 123 | return true; | ||
123 | } | 124 | } | ||
124 | 125 | | |||
125 | @Override | 126 | @Override | ||
Show All 9 Lines |