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庫。
在此先感謝