반응형
카카오톡처럼 notification을 여러 개로 보내야 하는 작업을 했습니다.
여러 개로 나누는 방법은
notificationManager.notify(Integer.valueOf(phoneNumber) /* ID of notification */, notificationBuilder.build());
이겁니다. 즉, notify 할 때 해당 노티마다 "구분"을 해주기 위한 "값"을 넣어줍니다. 그러면 여러 개의 노티가 똭!!!
그리고 해당 노티마다 "다른" 작동을 하기 위해서는
PendingIntent pendingIntent = PendingIntent.getActivity(this,
Integer.valueOf(phoneNumber) /* Request code */,
intent,
PendingIntent.FLAG_ONE_SHOT);
이렇게 pendin intent에서 request code를 변경해서 똭!!!!!!!
해주면 됩니다.
이 작업을 하면서 좀 배워갑니다 ㅎㅎ
pending intent flag값에 대한 설명 : http://devmingsa.tistory.com/11
pending intent request code에 대한 설명 : http://iw90.tistory.com/221?category=633188
반응형
'Android' 카테고리의 다른 글
앱에서 tagging 작업 시 debug 모드에서 보는 방법! (0) | 2019.06.14 |
---|---|
앱 개발 초보자가 알아가야 할 간단한 플로우?지식? (0) | 2019.06.14 |
MVP 디자인 패턴이란? (0) | 2019.05.27 |
android 에서 font 사용 시 필요한 "용량"!!! (0) | 2019.01.05 |
Google map api 적용하기 (0) | 2018.12.20 |