@@ -1201,46 +1201,43 @@ public void onNetworkFailure(Exception exception) {
1201
1201
};
1202
1202
1203
1203
private void setupNotificationChannels () {
1204
- if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .O ) {
1204
+ NotificationChannel nodeConnectedChannel = new NotificationChannel (AppConstants .CHANNEL_NODE_ONLINE_ID ,
1205
+ getString (R .string .channel_node_connected ), NotificationManager .IMPORTANCE_HIGH );
1205
1206
1206
- NotificationChannel nodeConnectedChannel = new NotificationChannel (AppConstants .CHANNEL_NODE_ONLINE_ID ,
1207
- getString (R .string .channel_node_connected ), NotificationManager .IMPORTANCE_HIGH );
1207
+ NotificationChannel nodeDisconnectedChannel = new NotificationChannel (AppConstants .CHANNEL_NODE_OFFLINE_ID ,
1208
+ getString (R .string .channel_node_disconnected ), NotificationManager .IMPORTANCE_HIGH );
1208
1209
1209
- NotificationChannel nodeDisconnectedChannel = new NotificationChannel (AppConstants .CHANNEL_NODE_OFFLINE_ID ,
1210
- getString (R .string .channel_node_disconnected ), NotificationManager .IMPORTANCE_HIGH );
1210
+ NotificationChannel nodeAddedChannel = new NotificationChannel (AppConstants .CHANNEL_NODE_ADDED ,
1211
+ getString (R .string .channel_node_added ), NotificationManager .IMPORTANCE_HIGH );
1211
1212
1212
- NotificationChannel nodeAddedChannel = new NotificationChannel (AppConstants .CHANNEL_NODE_ADDED ,
1213
- getString (R .string .channel_node_added ), NotificationManager .IMPORTANCE_HIGH );
1213
+ NotificationChannel nodeRemovedChannel = new NotificationChannel (AppConstants .CHANNEL_NODE_REMOVED ,
1214
+ getString (R .string .channel_node_removed ), NotificationManager .IMPORTANCE_HIGH );
1214
1215
1215
- NotificationChannel nodeRemovedChannel = new NotificationChannel (AppConstants .CHANNEL_NODE_REMOVED ,
1216
- getString (R .string .channel_node_removed ), NotificationManager .IMPORTANCE_HIGH );
1216
+ NotificationChannel nodeSharingChannel = new NotificationChannel (AppConstants .CHANNEL_NODE_SHARING ,
1217
+ getString (R .string .channel_node_sharing ), NotificationManager .IMPORTANCE_HIGH );
1217
1218
1218
- NotificationChannel nodeSharingChannel = new NotificationChannel (AppConstants .CHANNEL_NODE_SHARING ,
1219
- getString (R .string .channel_node_sharing ), NotificationManager .IMPORTANCE_HIGH );
1219
+ NotificationChannel alertChannel = new NotificationChannel (AppConstants .CHANNEL_ALERT ,
1220
+ getString (R .string .channel_node_alert ), NotificationManager .IMPORTANCE_HIGH );
1220
1221
1221
- NotificationChannel alertChannel = new NotificationChannel (AppConstants .CHANNEL_ALERT ,
1222
- getString (R .string .channel_node_alert ), NotificationManager .IMPORTANCE_HIGH );
1222
+ NotificationChannel automationChannel = new NotificationChannel (AppConstants .CHANNEL_NODE_AUTOMATION_TRIGGER ,
1223
+ getString (R .string .channel_node_automation_trigger ), NotificationManager .IMPORTANCE_HIGH );
1223
1224
1224
- NotificationChannel automationChannel = new NotificationChannel (AppConstants .CHANNEL_NODE_AUTOMATION_TRIGGER ,
1225
- getString (R .string .channel_node_automation_trigger ), NotificationManager .IMPORTANCE_HIGH );
1225
+ NotificationChannel groupSharingChannel = new NotificationChannel (AppConstants .CHANNEL_GROUP_SHARING ,
1226
+ getString (R .string .channel_node_group_sharing ), NotificationManager .IMPORTANCE_HIGH );
1226
1227
1227
- NotificationChannel groupSharingChannel = new NotificationChannel (AppConstants .CHANNEL_GROUP_SHARING ,
1228
- getString (R .string .channel_node_group_sharing ), NotificationManager .IMPORTANCE_HIGH );
1228
+ NotificationChannel adminChannel = new NotificationChannel (AppConstants .CHANNEL_ADMIN ,
1229
+ getString (R .string .channel_admin ), NotificationManager .IMPORTANCE_HIGH );
1229
1230
1230
- NotificationChannel adminChannel = new NotificationChannel (AppConstants .CHANNEL_ADMIN ,
1231
- getString (R .string .channel_admin ), NotificationManager .IMPORTANCE_HIGH );
1232
-
1233
- NotificationManager notificationManager = getSystemService (NotificationManager .class );
1234
- notificationManager .createNotificationChannel (nodeConnectedChannel );
1235
- notificationManager .createNotificationChannel (nodeDisconnectedChannel );
1236
- notificationManager .createNotificationChannel (nodeAddedChannel );
1237
- notificationManager .createNotificationChannel (nodeRemovedChannel );
1238
- notificationManager .createNotificationChannel (nodeSharingChannel );
1239
- notificationManager .createNotificationChannel (alertChannel );
1240
- notificationManager .createNotificationChannel (automationChannel );
1241
- notificationManager .createNotificationChannel (groupSharingChannel );
1242
- notificationManager .createNotificationChannel (adminChannel );
1243
- }
1231
+ NotificationManager notificationManager = getSystemService (NotificationManager .class );
1232
+ notificationManager .createNotificationChannel (nodeConnectedChannel );
1233
+ notificationManager .createNotificationChannel (nodeDisconnectedChannel );
1234
+ notificationManager .createNotificationChannel (nodeAddedChannel );
1235
+ notificationManager .createNotificationChannel (nodeRemovedChannel );
1236
+ notificationManager .createNotificationChannel (nodeSharingChannel );
1237
+ notificationManager .createNotificationChannel (alertChannel );
1238
+ notificationManager .createNotificationChannel (automationChannel );
1239
+ notificationManager .createNotificationChannel (groupSharingChannel );
1240
+ notificationManager .createNotificationChannel (adminChannel );
1244
1241
}
1245
1242
1246
1243
public void removeNodeInformation (String nodeId ) {
0 commit comments