푸시에 갯수로 표시하는게 아니라 층으로 쌓아서 표시하고 싶습니다.
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
여기서 0인 숫자를 유니크하게 바꿔주면 된다고 하던데..
안되더라구요..어떻게 해야하는지 답변 주시면 감사하겠습니다.
제소스는 아래와 같습니다.
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
PendingIntent contentIntent = PendingInten
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
int vibrate = 500;
if(alarmtype.equals("SLIENT")){
vibrate = 0;
}
try {
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_launcher)
// Notification Title
.setContentTitle(title)
.setStyle(new NotificationCompat.BigTextStyle().bigText(message))
.setContentText(message)
.setAutoCancel(true)
// button left
//.addAction(R.drawable.check, "OK", contentIntent)
// button right
//.addAction(R.drawable.check, "Cancel", contentIntent)
.setAutoCancel(true)
.setVibrate(new long[]{0, vibrate});
mBuilder.setContentIntent(contentIntent);
mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
}catch (Exception e){
}.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);