S3에서 알림 LED를 사용하는 알림을 사용하려고하지만 어떤 이유로 인해 색상이 항상 파란색으로 표시됩니다 (기본값이라고 생각하십니까?). 다른 색상을 사용하려고했지만 아무 것도 바뀌지 않았습니다. Whatsapp, Gmail 및 Facebook과 같은 다른 앱은 다른 색상의 빛을 나타내는 데 아무런 문제가 없습니다.Android 알림 LED가 내 색상을 사용하지 않습니다.
Notification.Builder noteBuilder = new Notification.Builder(context)
.setAutoCancel(true)
.setPriority(Notification.PRIORITY_DEFAULT)
.setSmallIcon(R.drawable.ic_launcher)
.setContentTitle(ContentTitle)
.setContentText(ContentText)
.setLights(Color.YELLOW, 500, 500)
;
Intent noteIntent = new Intent(context,HoofdScherm.class);
PendingIntent notePendingIntent = PendingIntent.getActivity(context, 0, noteIntent, PendingIntent.FLAG_CANCEL_CURRENT);
noteBuilder.setContentIntent(notePendingIntent);
Notification note = noteBuilder.build();
note.ledARGB = Color.YELLOW;
NotificationManager mgr = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
mgr.notify(0,note);
일부는 앱의 실행기 아이콘의 기본 색상을 사용하고, 일부는 알림/우선 순위 유형을 사용합니다. –
우선 순위를 설정하지 않으면 변경 될 수 있습니까? 또한 빌드 후 알림을 변경하기 때문에 LED 라이트를 생성하기위한 모든 단계를 추가해야합니다. 또한'notification.ledARGB = 0xff00ff00; notification.ledOnMS = 300; notification.ledOffMS = 1000; notification.flags | = 알림 .FLAG_SHOW_LIGHTS; ' –
우선 순위를 변경하려고했으나 (기본값은 높음을 사용하고 alzo는 설정하지 않았습니다). 그것은 차이를 만들지 않았다. 다음으로 다른 아이콘을 사용하려고 시도 하겠지만 라이트 관리자와 같은 앱이 내 S3에서 알림 색상을 설정할 수 있기 때문에 차이가 있다고 생각하지 않습니다. 'notification.defaults = 0;'을 추가하는 –