Java 禁用Android前台通知LED灯
如何使前台通知上的LED停止闪烁?它是一个橙色的LED,当我关闭屏幕时会闪烁。我不介意通知全天候亮起,但LED不会停止闪烁。这是我的通知:Java 禁用Android前台通知LED灯,java,android,android-service,android-notifications,foreground-service,Java,Android,Android Service,Android Notifications,Foreground Service,如何使前台通知上的LED停止闪烁?它是一个橙色的LED,当我关闭屏幕时会闪烁。我不介意通知全天候亮起,但LED不会停止闪烁。这是我的通知: Notification notification = new NotificationCompat.Builder(this, SERVICE_CHANNEL_ID) .setContentTitle("MyService") .setContentText(input) .setDefa
Notification notification = new NotificationCompat.Builder(this, SERVICE_CHANNEL_ID)
.setContentTitle("MyService")
.setContentText(input)
.setDefaults(0)
.setSmallIcon(R.drawable.ic_launcher_foreground)
.setContentIntent(pendingIntent)
.build();
Notification notification = new NotificationCompat.Builder(this, SERVICE_CHANNEL_ID)
.setContentTitle("MyService")
.setContentText(input)
.setDefaults(0)
.setSmallIcon(R.drawable.ic_launcher_foreground)
.setContentIntent(pendingIntent)
.build();
startForeground(1, notification);
这是我的通知频道:
NotificationChannel serviceChannel = new NotificationChannel(
SERVICE_CHANNEL_ID,
"Service Notification Channel",
NotificationManager.IMPORTANCE_NONE
);
我在安卓9上运行三星S8,API级别26