/
6.5.3. 디자인 커스터마이징

6.5.3. 디자인 커스터마이징

SDK 에서 제공하는 Dialog UI 커스터마이

  1. colorConfirm: 확인버튼 색상 color resource id

  2. colorCancel: 취소버튼 색상 color resource id

  3. imageRegisterLogo: register dialog 로고 이미지 drawable resource id

  4. imageUnregisterLogo: unregister dialog 로고 이미지 drawable resource id

final PushDialogConfig pushDialogConfig = new PushDialogConfig.Builder() .colorConfirm(R.color.colorAccent) .colorCancel(R.color.colorPrimary) .imageRegisterLogo(R.drawable.benefit_push_dialog_image_logo) .imageUnregisterLogo(R.drawable.benefit_push_dialog_image_logo) .build();

Foreground Service Notification 변경하기

푸시 기능을 안정적으로 서비스하기 위해서는 서비스(Foreground Service)가 필요합니다. 실행중인 다른 BuzzAd SDK의 Foreground Service가 없을 경우, BuzzAd Push 의 Foreground Service 서비스가 실행됩니다.

다른 BuzzAd SDK의 Foreground Service 란, 락스크린 또는 Pop 을 연동할 경우 실행되는 Foreground Service를 지칭하며, 이들이 활성화되면 BuzzAd Push 의 Foreground Service 서비스는 대체됩니다.

Push Service Notification 커스터마이징 방법

푸시 기능 활성화시에 보여지는 Notification을 변경할 수 있습니다.

  1. PushService 클래스를 상속받는 클래스를 구현합니다.
    buildForegroundNotification을 구현해서 Notification을 변경합니다.
    (Optional) PushService 클래스의 getFeedPendingIntent() 함수는 Feed로 진입할 수 있는 PendingIntent를 제공합니다.

    class CustomPushService extends PushService { @Override public Notification buildForegroundNotification(Context context) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { createYourNotificationChannel(); } return new NotificationCompat.Builder( context, "YOUR_NOTIFICATION_CHANNEL_ID" ) .setContentIntent(getFeedPendingIntent(false)) .build(); } }

     

  2. BuzzAdPush 생성 시점에 해당 PushService 클래스를 지정합니다.

    BuzzAdPush buzzAdPush = new BuzzAdPush( CustomPushService.class, CustomNotificationWorker.class, App.getPushDialogConfig() );

 

Related content