0
我已經建立通知欄通知欄不駁回
通知通知=新通知(logoId, 「ABC」,系統 .currentTimeMillis());
Intent intent = new Intent(context, NewActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0); notification.setLatestEventInfo(context, "PQR", "", pendingIntent); notification.flags |= Notification.FLAG_NO_CLEAR; ((NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE)).notify( Constants.NOTIFICATION_ID, notification);
如果設備強行重啓開機後仍然通知出現。
如果設備重新啓動,我需要關閉通知欄。
我想這一個..當用戶清除它從通知欄,刪除通知... –
那麼你想要什麼excatly? – Andrain
我不想強制清除用戶的通知。我的問題是這樣的。當用戶重新啓動設備時仍然可以通知托盤中的通知。 –