1
BroadcastReceiver() 내의 Notification에 문제가 있습니다. 알다시피, 제 코드는 이전에 제대로 작동했지만 지금은 작동하지 않습니다. 때때로 NotificationTicker가 나타나지만 제목과 내용이 표시되지 않습니다. 여기 내 코드입니다. 내 검색을 통해 문제가있는 곳을 찾을 수 없었습니다.BroadCastReceiver 내의 알림이 작동하지 않습니다.
private void MyNotification(Context context) {
String NotificqationText = "NotificqationText";
String NotificationTitle = "NotificationTitle ";
String NotificationTicker = "NotificationTicker";
PendingIntent MyPendingIntent = PendingIntent.getActivity(context, 0, new Intent(context, Splash.class), 0);
NotificationCompat.Builder MyNB = new NotificationCompat.Builder(context);
MyNB.setSmallIcon(R.drawable.icon);
MyNB.setContentTitle(NotificationTitle);
MyNB.setContentText(NotificqationText);
MyNB.setTicker(NotificationTicker);
MyNB.setAutoCancel(true);
MyNB.setContentIntent(MyPendingIntent);
Bitmap MyPicture = BitmapFactory.decodeResource(context.getResources(), R.drawable.icon);
MyNB.setLargeIcon(MyPicture);
NotificationCompat.BigPictureStyle MyPicStyle = new NotificationCompat.BigPictureStyle().bigPicture(MyPicture);
MyPicStyle.setSummaryText("Etude can makes our life Enlightened");
MyNB.setStyle(MyPicStyle);
MyNB.setStyle(new NotificationCompat.BigTextStyle());
NotificationCompat.BigTextStyle MyText = new NotificationCompat.BigTextStyle();
MyText.bigText(NotificqationText);
MyText.setBigContentTitle(NotificationTitle);
NotificationManager MyNotifyManager = (NotificationManager) context.getSystemService(context.NOTIFICATION_SERVICE);
MyNotifyManager.notify(1, MyNB.build());
}
내 브로드 캐스트 리시버의 작품을 찾을 여부와 방송을 찾기 위해 토스트 메시지를 사용
가 제대로 작동 만 통지가 문제
다시 코드를 확인했지만 "Clean Master"와 같은 일부 응용 프로그램은 내 전화에서 내 알림을 차단했습니다. –