Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. DefaultPopFeedbackHandler를 상속 받는 클래스를 생성합니다.

  2. PopConfig를 초기화할 때에, 이전 스텝에서 생성한 Custom PopFeedbackHandler 클래스를 넘겨줍니다.

Code Block
languagejava
public class CustomPopFeedbackHandlerCustomPopFeedback extends DefaultPopFeedbackHandler {
    @Override
    public void notifyNativeAdReward(
            @NotNull Context context,
            @NotNull View view,
            boolean canUseSnackbar,
            int reward
    ) {
        String message = "Customized feed launch reward message";

        if (canUseSnackbar) {
            showSnackbar(Toast.makeText(context, viewmessage, message);
        } else {
            showToast(context, message);
        }Toast.LENGTH_SHORT).show();
     }
}

Code Block
languagejava
PopConfig popConfig = new PopConfig.Builder(this, YOUR_POP_UNIT_ID)
      ...(생략)...
      .popFeedbackHandlerClass(CustomPopFeedbackHandlerClass.class)
      .build();

...