comparison app/src/main/java/com/five_ten_sg/connectbot/service/ConnectionNotifier.java @ 503:cbdb219e9ff5

updates for android10+
author Carl Byington <carl@five-ten-sg.com>
date Wed, 08 Jun 2022 09:00:34 -0700
parents 7545103ec815
children
comparison
equal deleted inserted replaced
502:7e53f29f8b5a 503:cbdb219e9ff5
93 } 93 }
94 94
95 protected Notification newRunningNotification(Context context) { 95 protected Notification newRunningNotification(Context context) {
96 Resources res = context.getResources(); 96 Resources res = context.getResources();
97 Intent notificationIntent = new Intent(context, ConsoleActivity.class); 97 Intent notificationIntent = new Intent(context, ConsoleActivity.class);
98 PendingIntent contentIntent = PendingIntent.getActivity(context, ONLINE_NOTIFICATION, notificationIntent, 0); 98 PendingIntent contentIntent = PendingIntent.getActivity(context, ONLINE_NOTIFICATION, notificationIntent, PendingIntent.FLAG_IMMUTABLE);
99 99
100 Notification.Builder nb; 100 Notification.Builder nb;
101 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { 101 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
102 String channelID = "com.five_ten_sg.connectbot.service"; 102 String channelID = "com.five_ten_sg.connectbot.service";
103 String channelName = "background"; 103 String channelName = "background";