/
Interstitial νƒ€μž…

Interstitial νƒ€μž…

BuzzAd-Benefit SDK: Type C - Interstitial


λ³Έ κ°€μ΄λ“œλŠ” BuzzAd-Benefit SDK의 Interstitial νƒ€μž… κ΄‘κ³ λ₯Ό μ—°λ™ν•˜λŠ” 방법을 λ‹€λ£¨λŠ” λ¬Έμ„œμž…λ‹ˆλ‹€.

β€» μ£Όμ˜μ‚¬ν•­

Interstitial νƒ€μž…μ„ μ—°λ™ν•˜κΈ° μ „, 곡톡 κ°€μ΄λ“œμ˜ 연동 사항을 λͺ¨λ‘ μ μš©ν–ˆλŠ”μ§€ ν™•μΈν•΄μ£Όμ„Έμš”.

β€» 참고사항

Interstitial νƒ€μž…μ€Β λ„€μ΄ν‹°λΈŒ νƒ€μž…Β λ°©μ‹μ„ ν™œμš©ν•΄μ„œ 맀체사가 자체적으둜 κ΅¬ν˜„ν•˜μ‹€ 수 μžˆκΈ°λŠ” ν•˜λ‚˜, λ§€μ²΄μ‚¬μ˜ κ΅¬ν˜„ νŽΈμ˜μ„±μ„ μœ„ν•˜μ—¬ BuzzAd-Benefit SDK 내에도 미리 κ΅¬ν˜„μ„ ν•΄ 놓은 κΈ°λŠ₯μž…λ‹ˆλ‹€. λ”°λΌμ„œ Customization이 κ°€λŠ₯ν•œ μ˜μ—­μ΄ μ œν•œμ μ΄κΈ° λ•Œλ¬Έμ— 쑰금 더 자유둜운 κ΅¬ν˜„μ„ μ›ν•˜μ‹œλŠ” κ²½μš°Β λ„€μ΄ν‹°λΈŒ νƒ€μž…Β λ°©μ‹μ„ μ΄μš©ν•΄ μ£Όμ‹œλ©΄ κ°μ‚¬ν•˜κ² μŠ΅λ‹ˆλ‹€.

Β 

Index

Β 

Basic Usage


InterstitialAdHandlerΒ μ„€μ •

  1. Interstitial unit_id와 InterstitialAdHandler의 type (Dialog λ˜λŠ” Bottomsheet, μžμ„Έν•œ λ‚΄μš©μ€ μ•„λž˜ μ°Έμ‘°)을 μ‚¬μš©ν•˜μ—¬Β InterstitialAdHandlerλ₯Ό μƒμ„±ν•©λ‹ˆλ‹€.

  2. interstitialAdHandler.show(κ΄‘κ³ κ°€_λ…ΈμΆœλ _Activity.this)λ₯Ό ν˜ΈμΆœν•˜μ—¬ κ΄‘κ³ λ₯Ό ν˜ΈμΆœν•©λ‹ˆλ‹€.


    final InterstitialAdHandler interstitialAdHandler = new InterstitialAdHandlerFactory() .create("YOUR_INTERSTITIAL_UNIT_ID", InterstitialAdHandler.Type.Dialog); interstitialAdHandler.show(MainActivity.this);

Interstitial TypeΒ μ„€μ •

Interstitial κ΄‘κ³  type 쀑 Dialog와 BottomSheet을 μ œκ³΅ν•©λ‹ˆλ‹€. μœ„μ—μ„œ InterstitialAdHandler μ„€μ •μ‹œ μ›ν•˜μ‹œλŠ” Type으둜 각각 InterstitialAdHandler.Type.DialogΒ λ˜λŠ”Β InterstitialAdHandler.Type.BottomSheet으둜 μ„€μ •ν•˜μ‹œλ©΄ λ©λ‹ˆλ‹€.

Bottom sheet

Β 

Dialog

Β 

Β 

Advanced Usage


InterstitialAdConfig의 μ„€μ •

Interstitial κ΄‘κ³ μ˜ λ””μžμΈ μ˜μ—­ 및 κ΄‘κ³  μš”μ²­ κ°œμˆ˜μ— λŒ€ν•΄μ„œ λ§€μ²΄μ‚¬μ—μ„œ Customize ν•  수 μžˆλ„λ‘ μ§€μ›ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. μ„€μ •λœΒ InterstitialAdConfigλŠ”Β interstitialAdHandler.show()λ₯Ό ν˜ΈμΆœν•  λ•Œ λ„£μ–΄μ„œ ν˜ΈμΆœν•©λ‹ˆλ‹€.

곡톡 Config

  • topIconΒ : Interstitial κ΄‘κ³  상단에 μžˆλŠ” μ•„μ΄μ½˜ (μƒ˜ν”Œμ½”λ“œμ²˜λŸΌ drawable의 id둜 μ§€μ •ν•˜κ±°λ‚˜ drawable type으둜 지정 κ°€λŠ₯)

  • titleTextΒ : Interstitial κ΄‘κ³  상단에 μžˆλŠ” Text

  • textColorΒ : titleText의 색깔

  • layoutBackgroundColorΒ : Interstitial κ΄‘κ³  μ „μ²΄μ˜ λ°°κ²½ 색깔

  • ctaViewBackgroundColorListΒ : CTA의 λ°°κ²½ 색깔

  • ctaRewardDrawableΒ : CTA에 ν¬ν•¨λœ κΈ°λ³Έ μ•„μ΄μ½˜ (μƒ˜ν”Œμ½”λ“œμ²˜λŸΌ drawable의 id둜 μ§€μ •ν•˜κ±°λ‚˜ drawable type으둜 지정 κ°€λŠ₯)

  • ctaParticipatedDrawableΒ : κ΄‘κ³  μ°Έμ—¬ μ™„λ£Œ ν›„ λ³΄μ—¬μ£ΌλŠ” CTA에 ν¬ν•¨λœ μ•„μ΄μ½˜ (μƒ˜ν”Œμ½”λ“œμ²˜λŸΌ drawable의 id둜 μ§€μ •ν•˜κ±°λ‚˜ drawable type으둜 지정 κ°€λŠ₯)

  • ctaViewTextColorΒ : CTA의 Text 색깔

Dialog μ „μš©

  • closeTextΒ : λ‹«κΈ° λ²„νŠΌμ˜ Text

Bottom Sheet μ „μš©

  • adCountΒ : ν•œλ²ˆμ— μš”μ²­ν•˜λŠ” κ΄‘κ³ μ˜ 개수. 1 ~ 5κ°€ κ°€λŠ₯ν•˜λ©°, adCountλ₯Ό μ§€μ •ν•˜μ§€ μ•Šκ±°λ‚˜ 1 ~ 5 μ™Έμ˜ λ²”μœ„λ₯Ό 지정할 경우 5둜 고정됨

Β 

InterstitialAdConfig interstitialAdConfig = new InterstitialAdConfig.Builder() .topIcon(R.drawable.bz_ic_checked_circle) .titleText("μ§€κΈˆ λ°”λ‘œ μ°Έμ—¬ν•˜κ³  포인트 λ°›κΈ°") .textColor(android.R.color.white) .layoutBackgroundColor(R.color.colorPrimaryDark) .ctaViewBackgroundColorList(getBackgroundColorStateList()) .ctaRewardDrawable(R.drawable.bz_ic_custom_reward) .ctaParticipatedDrawable(R.drawable.bz_ic_btn_more) .ctaViewTextColor(getTextColorStateList()) .closeText("λ‹«κΈ°") .build(); final InterstitialAdHandler interstitialAdHandler = new InterstitialAdHandlerFactory() .create("YOUR_INTERSTITIAL_UNIT_ID", InterstitialAdHandler.Type.Dialog); interstitialAdHandler.show(MainActivity.this, interstitialAdConfig); private ColorStateList getBackgroundColorStateList() { final int[][] states = new int[][]{ new int[]{android.R.attr.state_enabled}, // enabled new int[]{android.R.attr.state_pressed} // pressed }; final int[] colors = new int[]{ ContextCompat.getColor(this, android.R.color.holo_green_light), ContextCompat.getColor(this, android.R.color.holo_green_dark) }; return new ColorStateList(states, colors); } private ColorStateList getTextColorStateList() { int[][] states = new int[][]{ new int[]{android.R.attr.state_enabled}, // enabled new int[]{android.R.attr.state_pressed} // pressed }; int[] colors = new int[]{ Color.WHITE, Color.WHITE }; return new ColorStateList(states, colors); }

κ΄‘κ³  λ‘œλ“œ 결과에 λŒ€ν•œ λ¦¬μŠ€λ„ˆ 등둝

κ΄‘κ³ κ°€ λ‘œλ“œμ— μ‹€νŒ¨ν•œ κ²½μš°μ— λŒ€ν•΄ λ¦¬μŠ€λ„ˆλ₯Ό 등둝할 수 μžˆμŠ΅λ‹ˆλ‹€.

Β 

interstitialAdHandler.show(MainActivity.this, interstitialAdConfig, new InterstitialAdHandler.OnInterstitialAdEventListener() { @Override public void onAdLoadFailed(AdError error) { // λ‘œλ“œ μ‹€νŒ¨μ‹œ. errorλ₯Ό 톡해 λ‘œλ“œ μ‹€νŒ¨ 이유λ₯Ό μ•Œ 수 있음 } @Override public void onAdLoaded() { // λ‘œλ“œ μ„±κ³΅μ‹œ } });

Related content