I created a notification using the android.support.v4.app.NotificationCompat.Builder file. The notification displayed in the notification area is excellent. But on Android 4.2, the default close button is not displayed.
http://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder.html#setOngoing(boolean)
According to the document, its the type of regular notification that the close button X should show, but it is not. Using the following code:
mBuilder = new NotificationCompat.Builder(context); mBuilder.setSmallIcon(iconId); mBuilder.setContentTitle(titleText); mBuilder.setContentText(moreinfoText); mBuilder.setOngoing(false);
Search on Google, but did not find anything like it. Please suggest.
Thank you for your time!
user2087206
source share