7
通知をクリックしてもAndroid通知が消えない
通知に関する問題が発生した場合は、通知バーに表示します。通知フラグを設定しても通知Notification.DEFAULT_LIGHTS & Notification.FLAG_AUTO_CANCELをクリックしても消えません。私が間違っていることはありますか? NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); int icon = R.drawable.icon; CharSequence tickerText = "Ticker Text"; long time = System.currentTimeMillis(); Notification notification = new Notification(icon, tickerText, time); notification.flags = Notification.DEFAULT_LIGHTS & Notification.FLAG_AUTO_CANCEL; Context context = getApplicationContext(); CharSequence contentTitle = "Title"; CharSequence contentText = "Text"; Intent notificationIntent = new Intent(this, …
132
android
notifications