Changeset View
Changeset View
Standalone View
Standalone View
src/org/kde/kdeconnect/Plugins/PingPlugin/PingPlugin.java
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | 67 | PendingIntent resultPendingIntent = stackBuilder.getPendingIntent( | |||
---|---|---|---|---|---|
68 | 0, | 68 | 0, | ||
69 | PendingIntent.FLAG_UPDATE_CURRENT | 69 | PendingIntent.FLAG_UPDATE_CURRENT | ||
70 | ); | 70 | ); | ||
71 | 71 | | |||
72 | int id; | 72 | int id; | ||
73 | String message; | 73 | String message; | ||
74 | if (np.has("message")) { | 74 | if (np.has("message")) { | ||
75 | message = np.getString("message"); | 75 | message = np.getString("message"); | ||
76 | id = (int)System.currentTimeMillis(); | 76 | id = (int) System.currentTimeMillis(); | ||
77 | } else { | 77 | } else { | ||
78 | message = "Ping!"; | 78 | message = "Ping!"; | ||
79 | id = 42; //A unique id to create only one notification | 79 | id = 42; //A unique id to create only one notification | ||
80 | } | 80 | } | ||
81 | 81 | | |||
82 | Notification noti = new NotificationCompat.Builder(context) | 82 | Notification noti = new NotificationCompat.Builder(context) | ||
83 | .setContentTitle(device.getName()) | 83 | .setContentTitle(device.getName()) | ||
84 | .setContentText(message) | 84 | .setContentText(message) | ||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |