mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 21:06:50 +01:00
Device connection: added Scan service channel
This commit is contained in:
parent
281a087550
commit
b1b5eada68
@ -180,7 +180,7 @@ public class BLEScanService extends Service {
|
||||
private Notification createNotification(String content, int icon){
|
||||
|
||||
return new NotificationCompat
|
||||
.Builder(this, GB.NOTIFICATION_CHANNEL_ID)
|
||||
.Builder(this, GB.NOTIFICATION_CHANNEL_ID_SCAN_SERVICE)
|
||||
.setContentTitle(getString(R.string.scan_service_title))
|
||||
.setContentText(content)
|
||||
.setSmallIcon(icon)
|
||||
|
@ -67,6 +67,7 @@ public class GB {
|
||||
|
||||
public static final String NOTIFICATION_CHANNEL_ID = "gadgetbridge";
|
||||
public static final String NOTIFICATION_CHANNEL_ID_CONNECTION_STATUS = "gadgetbridge connection status";
|
||||
public static final String NOTIFICATION_CHANNEL_ID_SCAN_SERVICE = "gadgetbridge_scan_service";
|
||||
public static final String NOTIFICATION_CHANNEL_HIGH_PRIORITY_ID = "gadgetbridge_high_priority";
|
||||
public static final String NOTIFICATION_CHANNEL_ID_TRANSFER = "gadgetbridge transfer";
|
||||
public static final String NOTIFICATION_CHANNEL_ID_LOW_BATTERY = "low_battery";
|
||||
@ -121,6 +122,12 @@ public class GB {
|
||||
NotificationManager.IMPORTANCE_LOW);
|
||||
notificationManager.createNotificationChannel(channelConnwectionStatus);
|
||||
|
||||
NotificationChannel channelScanService = new NotificationChannel(
|
||||
NOTIFICATION_CHANNEL_ID_SCAN_SERVICE,
|
||||
context.getString(R.string.notification_channel_scan_service_name),
|
||||
NotificationManager.IMPORTANCE_LOW);
|
||||
notificationManager.createNotificationChannel(channelScanService);
|
||||
|
||||
NotificationChannel channelHighPriority = new NotificationChannel(
|
||||
NOTIFICATION_CHANNEL_HIGH_PRIORITY_ID,
|
||||
context.getString(R.string.notification_channel_high_priority_name),
|
||||
|
@ -2695,4 +2695,5 @@
|
||||
<string name="scan_scanning_single_device">Scanning 1 device</string>
|
||||
<string name="scan_scanning_multiple_devices">Scanning %d devices</string>
|
||||
<string name="scan_service_title">Scan service</string>
|
||||
<string name="notification_channel_scan_service_name">Scan service</string>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user