3

나는 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()); 
} 

이유가 무엇인지 알 수 있습니까? 내 장치에서 일하니?

+0

pre-JB? 그게 무슨 뜻 이죠? – Teovald

+0

preJB는 JelllyBean 전에 preHoneycomb 등을 말합니다. –

+0

저는 같은 문제가 있습니다. 저는 micromax canvas A74입니다. 문제에 대한 정보를 얻었습니까? –

답변

9

Android 4.1의 BigTextStyle 알림을 확장하려면 두 손가락이 필요합니다.

Android 4.2에서는 손가락이 하나만 필요합니다. 참조 용 비디오를보십시오. .Accordingly이 게시물에 다른 대답을 노고해야 당신의 code.That을 변경 NotificationCompat.Builder 대신 Notification.Builder의를 사용하여 http://www.youtube.com/watch?v=a6dzMzklEd4

1

봅니다 중요한입니다.

+0

내 HTC Sensation의 4.1 버전이 새로운 JellyBean Notification을 지원하지 않았습니다. 나는 내 전화를 4.2로 업데이트했고 이제는 그 모든 통지를 지원한다. 이것은 아주 오래된 글입니다. –