regular notification wont show X close button in android -
i created notification using android.support.v4.app.notificationcompat.builder. notification shows fine in notification area.but doesn't show default close button on android 4.2.
http://developer.android.com/reference/android/support/v4/app/notificationcompat.builder.html#setongoing(boolean)
as per docuentation,its type of regular notification should show x close button doesn't. using next code:
mbuilder = new notificationcompat.builder(context); mbuilder.setsmallicon(iconid); mbuilder.setcontenttitle(titletext); mbuilder.setcontenttext(moreinfotext); mbuilder.setongoing(false); //to create regular pendingintent pintent = pendingintent.getactivity(context,noteid,resultintent,pendingintent.flag_update_current); mbuilder.setcontentintent(pintent); notificationmanager mnotificationmanager = (notificationmanager) context.getsystemservice(context.notification_service); mnotificationmanager.notify(noteid, mbuilder.build());
searched on google couldn't find similar. please suggest.
thanks time!
android button notifications default
No comments:
Post a Comment