2
현재 작업과 함께 foregroundNotification을 만들려고하지만 작업 + 아이콘이 표시되지 않습니다.Android - startForeground 작업이 표시되지 않습니다.
Intent intent = new Intent(KEY);
PendingIntent nextIntent = PendingIntent.getBroadcast(this, 0, intent, 0);
// Build the notification that tells the user that the service
// is ongoing
NotificationCompat.Builder foregroundNoteBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(....)
.setContentTitle(....)
.setContentText(....)
.addAction(R.drawable.pause, "Pause all messages", nextIntent);
Notification note = foregroundNoteBuilder.build();
// Update the notification
startForeground(1, note);
전경 통지가 조치없이 보여줍니다
여기 내 코드입니다. 어떤 제안? 감사.
편집 : 다른 알림이 알림 창 (예 : "GPS를 사용하여 검색 중 ...", "미디어 장치로 연결됨"등)에있는 경우 발생합니다. 왜 이런 일이 일어나고 있는지에 대한 아이디어가 있습니까?
전체 코드 (예 : startForeground() 메소드 구현)를 게시 할 수 있습니까? –