How to dismiss notification without intent?
问题 I want to display a notification inside the app that disappears when the notification is tapped without starting an activity. I use an empty intent and it works: Intent intent = new Intent(); PendingIntent contentIntent = PendingIntent.getActivity(context, (int)System.currentTimeMillis(), intent, PendingIntent.FLAG_UPDATE_CURRENT); NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context, "") .setSmallIcon(R.drawable.icon) .setContentTitle(title) .setContentText(text)