سلام دوستان
من از از کد زیر برای نمایش notification استفاده میکنم چگونه میتونم بدون اینکه کار خاصی انجام بده پس از کلیک روش حذف بشه.
الان این نیتیفیکشن اجرا میشه ولی حذف نمیشه
public void notif(){
if (txtResult!= null){
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.alertnotif) //notification icon
.setContentTitle("گزارش ")
.setContentText(txtResult)
.setAutoCancel(true);
NotificationManager mNotificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mBuilder.getNotification().flags |= Notification.FLAG_AUTO_CANCEL;
mNotificationManager.notify(0, mBuilder.build());
}else
{
finish();
}
}