나는 BigTextStyle/InboxStyle 통지를 구현하지만이 젤리 빈 전에 표시되는 일반 알림으로 표시됩니다 (진저 브레드, ICS 등의 수단) T (4.1.1). 액션 버튼도 표시되지 않습니다.안드로이드 젤리 빈 BigTextStyle 알림이 작동하지 않습니다 - & AT 내 HTC 하나 X에 HTC 한 X는 AT & T
내 코드를 에뮬레이터 (JellyBean 4.2 포함)로 확인했는데 작동하고 있습니다.
은 HTC의 나의 버전 하나 X.
HTC 하나의 X & T AT 장치 정보를 구현되지 않은 젤리 빈의 새로운 알림 시스템과 같은
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
소스 코드
@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 an Event by " + passedBy);
builder.setTicker("Recieved an Event by " + 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());
}
이유가 무엇인지 알 수 있습니까? 내 장치에서 일하니?
pre-JB? 그게 무슨 뜻 이죠? – Teovald
preJB는 JelllyBean 전에 preHoneycomb 등을 말합니다. –
저는 같은 문제가 있습니다. 저는 micromax canvas A74입니다. 문제에 대한 정보를 얻었습니까? –