notification 3

안드로이드 - Notification 갱신

Notification Text Update 처음에 Notification 에 특정 메세지를 실어서 보낸 후, 해당 Notification 에 텍스트를 갱신(update) 를 하기를 원할 경우에는 이미 사용했던 Notification Builder 를 다시 notify() 해야 합니다. Issue : https://stackoverflow.com/q/14885368/3897810 solution : https://stackoverflow.com/a/16435330/3897810 저같은 경우는 startForeground() 를 사용해서 Notification 을 보냈기 때문에, 동일한 ID 와 Builder 를 통해서 startForeground() 를 사용해서 텍스트를 갱신했습니다. startForeg..

Dev/Android 2019.03.26

Android Notification 설정 - Head Up

Android Notification 설정 Head Up 알림 띄우기 위한 방법 첫번째Notification.Builder.setFullScreenIntent(pendingIntent, true);setFullScreenIntent() 메서드를 통해서 Head Up 알림을 띄운다. 다만, 자동으로 Head Up 알림이 사라지지 않는다. 또한 setContentIntent(Intent) 메서드를 사용하지 않는다면 해당 알림을 눌러도 해당 Activity 로 이동되는 트리거 동작이 없다. 두번째Notification.Builder.setPriority(Notification.PRIORITY_MAX);Notification.Builder.setDefaults(DEFAULT_SOUND or DEFAULT_VIB..

Dev/Android 2017.11.15