Android JellyBean BigTextStyle Notification not working - HTC One X AT&T -
i have implemented bigtextstyle/inboxstyle notification shown normal notification shown before jellybean (means in gingerbread, ics etc) on htc 1 x at&t (which 4.1.1). action buttons not shown.
i have check code emulator (with jellybean 4.2) , working.
it looks new notification system of jellybean not implemented version of htc 1 x.
htc 1 x at&t device info
android version - 4.1.1 htc sense version - 4+ software number - 3.18.502.6 710rd htc sdk api level - 4.63 htc extension version - htcextension_sesnse45_2
source code
@targetapi(build.version_codes.jelly_bean) private void shownotificationjb(reminder reminder, intent intent) { log.v(tag, "showing bigtext notification"); notification.builder builder = new notification.builder(this); builder.setcontenttitle("ezeetrak scheduler"); additionaldatastore store = reminder.getstore(); string passedby = store.optstring("passedby"); builder.setcontenttext("recieved event " + passedby); builder.setticker("recieved event " + passedby); builder.setsmallicon(r.drawable.ic_launcher); notification.inboxstyle inboxstyle = new notification.inboxstyle(); inboxstyle.addline(html.fromhtml("<b>name: </b>" + reminder.geteventname())); inboxstyle.addline(html.fromhtml("<b>date: </b>" + datetimehelper.dateformat.format(reminder.geteventdate()))); inboxstyle.addline(html.fromhtml("<b>time: </b>" + reminder.geteventtimeformatted())); inboxstyle.addline(html.fromhtml("<b>sent by: </b>" + passedby)); inboxstyle.setbigcontenttitle("ezeetrak scheduler"); builder.setstyle(inboxstyle); pendingintent acceptpendingintent = buildpendingintent(reminderactivity.action_accept, intent, 0); pendingintent rejectpendingintent = buildpendingintent(reminderactivity.action_reject, intent, 1); builder.setcontentintent(buildpendingintent(reminderactivity.action_view, intent, 2)); builder.addaction(r.drawable.ic_action_accept, "accept", acceptpendingintent); builder.addaction(r.drawable.ic_action_reject, "reject", rejectpendingintent); builder.setautocancel(false); notificationmanager notificationmanager = (notificationmanager) getsystemservice(notification_service); notificationmanager.notify(reminder_share_action, builder.build()); }
do have idea why it's not working device?
the bigtextstyle notification in android 4.1 needs 2 fingers expand it.
in android 4.2, 1 finger required. see video reference. http://www.youtube.com/watch?v=a6dzmzkled4
Comments
Post a Comment