Reward Banner 스크립트 Android

본 가이드는 Android 환경에서 스크립트 클릭 시, 리워드 지급을 위한 연동 방식을 기술합니다.

1. WebView 추가

오직 Reward Banner 광고 만을 위한 WebView를 추가합니다.

XML
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ScrollView 
	android:layout_width="match_parent"
	android:layout_height="match_parent"
	android:scrollbars="none">
	...
	<WebView 	
		android:layout_width="match_parent"
		android:layout_height="100dp"
		android:id="@+id/rcpc_webview"/>
	...
    </ScrollView>
</FrameLayout>

2. WebView 세팅 및 랜딩

1) 광고 설정 순서

2) WebView 관련 설정

webView 관련 설정을 아래와 같이 진행합니다. (initializeWebViewSetting)

3) script 로드

애드팝콘 사업실로 부터 전달받은 아래 형태의 script를 webview에 로드합니다.(loadScript)

  • 안드로이드 파라미터 정의

광고 물량은 전달 가능한 파라미터 범위에 따라 달라질 수 있습니다. 가능한 범위 내 최대한 전달해주시길 바랍니다.

Parameter
필수
Type
Default
설명

app_key

Y

string

매체용으로 발급된 광고 앱 키

placement_id

Y

string

매체용으로 발급된 광고 지면 아이디

adid

Y

string

Android 광고 식별자

network

N

string

""

네트워크 (mobile or wifi)

carrier

N

string

""

통신사

model

N

string

""

모델명

manufacturer

N

string

""

제조사

os_version

N

string

"0"

플랫폼 OS 버전

skip_mediation

N

boolean

false

미디에이션 광고 skip 여부 (true 전달시, 기본 설정 광고 노출)

단, script의 adid 매크로 값에는 ADID 값을 치환하여 전달해 주시면 됩니다.

ADID를 가져오는 방법은 아래의 링크를 참고해 주시기 바랍니다.

4) 클릭 발생 시 리워드 지급

해당 webview에서 클릭 발생 시, 클릭을 캐치하여 리워드 지급 후, 랜딩 주소로 랜딩 시켜줍니다.

Last updated

Was this helpful?