...
Code Block | ||
---|---|---|
| ||
PopConfig popConfig = new PopConfig.Builder(context, "YOUR_POPFEED_UNIT_ID") ...생략... .iconResId(R.drawable.your_pop_icon) .rewardReadyIconResId(R.drawable.you_pop_icon_reward_ready) |
...
Code Block | ||
---|---|---|
| ||
final PopNotificationConfig popNotificationConfig = new PopNotificationConfig.Builder(context) .smallIconResId(R.drawable.your_small_icon) .titleResId(R.string.your_pop_notification_title) .textResId(R.string.your_pop_notification_text) .colorResId(R.color.your_pop_notification_color) .notificationId(1000) .build(); PopConfig popConfig = new PopConfig.Builder(context, "YOUR_POPFEED_UNIT_ID") ...생략... .popNotificationConfig(popNotificationConfig) .build(); |
...
Code Block | ||
---|---|---|
| ||
new PopConfig.Builder(getApplicationContext(), "YOUR_POPFEED_UNIT_ID") ...생략... .popUtilityLayoutHandlerClass(CustomPopUtilityLayoutHandler.class) .build(); |
...
DefaultPopFeedbackHandler
를 상속 받는 클래스를 생성합니다.Code Block public class CustomPopFeedback 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(message, view); } else { showToast(message); } } }
PopConfig에이전 스텝에서 생성한 Custom PopFeedbackHandler 클래스를 넘겨줍니다.
Code Block language java PopConfig popConfig = new PopConfig.Builder(this, "YOUR_POPFEED_UNIT_ID") ...생략... .popFeedbackHandlerClass(CustomPopFeedbackHandlerClass.class) .build();
...