我已经在我的应用程序中设置了通知。它的工作正常。如果我点击statusbar
中的通知,它会发送到我的应用程序。
现在我需要设置一些工作,如果通知被点击,我可以在哪里设置? 当通知被点击时,是否有隐式调用的方法?
另外我想删除该通知,如果它被点击,该怎么做?onclicklistener通知
这是我的代码
notifManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
Intent inty=getIntent();
note = new Notification(R.drawable.icon, "New E-mail", System.currentTimeMillis());
PendingIntent intent = PendingIntent.getActivity(MainActivity.this, 0, inty, 0);
note.setLatestEventInfo(MainActivity.this, "New E-mail", "You have one unread message.", intent);
notifManager.notify(R.string.search_hint, note);