2014-10-29 1 views
2

스태킹 알림 및 요약을 위해 setGroup() 그룹에 알림을 지정하고 싶습니다.은 메소드 setgroup을 해결할 수 없습니다.

HERE

final static String GROUP_KEY_SAPPHIRE = "group_key_emails"; 
NotificationCompat.Builder oneBuilder = new NotificationCompat.Builder(this); 

     oneBuilder.setSmallIcon(R.drawable.warning_icon) 
     .setContentTitle("Warning: ") 
     .setContentText(message) 
     .setPriority(0x00000002) 
     .setLights(Color.GREEN, 500, 500) 
     .setGroup(GROUP_KEY_SAPPHIRE) 

     .addAction (R.drawable.ic_action_accept_dark, 
      getString(R.string.ok), warningPendingIntent); 

    NotificationManager oneNotificationManager = 
      (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); 

    oneNotificationManager.notify(NOTIFICATION_ID, oneBuilder.build()); 
    editText.setText(""); 

좋아하지만 난 항상 방법 setGroup가 해결 될 수 없다는 반응을 얻었다. .v4.support 라이브러리을 가져 왔습니다. 사전

답변

1

이 너무 늦었지만 모두를 위해 할 수있는

덕분에 다른 사람이 .v4.support 라이브러리를 업데이트해야, 나 같은 문제를 가지고 있었다. Gradle build.gradle 앱 종속성에서 적어도 support-v4 : 21까지 지원되는이 스태킹 스타일은 API 21 이상에서 사용할 수 있습니다.

관련 문제