버즈애드 오퍼월을 안드로이드 어플리케이션에 연동하기 위한 가이드 문서입니다. 유저가 여러 액션형 광고에 참여할 수 있는 오퍼월 지면을 손쉽게 연동할 수 있습니다.
예시 화면은 아래와 같습니다. 원하는 테마 컬러의 hex code를 버즈빌 매니저에게 전달주시면 적용 가능합니다. 색상 적용 범위는 아래와 같습니다.
원하는 테마 컬러의 hex code를 버즈빌 매니저에게 전달주시면 적용 가능합니다. 색상 적용 범위는 아래와 같습니다.
|
항목 | 내용 | 비고 | |
---|---|---|---|
1 | 안드로이드 지원 버전 | Android 4.2(API Level 17) 이상 | |
2 | Offerwall SDK의 대응: 1.1.0 버전 이상에서
| 정책 적용 시점
| |
3 |
| SDK 연동 및 샘플 어플리케이션 실행을 위해 필요 | 버즈빌 BD 매니저로부터 발급 |
하위 버전에서 1.1.0 버전 이상으로 업데이트 시, |
1. build.gradle
설정
repositories { maven { url "https://dl.buzzvil.com/public/maven" } } dependencies { implementation 'com.buzzvil:buzzad-offerwall:1.1.5' } |
2. AndroidManifest.xml
에 아래와 같이 권한을 추가하고, 액티비티를 설정합니다.
<manifest> ... <!-- Permission for BuzzAd --> <uses-permission android:name="android.permission.INTERNET" /> <!-- Below are Optional but recommended. without it you can only get limited ad list --> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <application> ... <!-- Setting for Google Play Services --> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> <!-- Activity for BuzzAd --> <activity android:name="com.buzzvil.buzzad.sdk.OfferWallActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" /> </application> </manifest> |
ProGuard 사용 시 하기 code block 의 라인들을 ProGuard 설정에 추가합니다.
ProGuard 사용 시 하기 code block 의 라인들을 ProGuard 설정에 추가합니다.
-keep class com.buzzvil.buzzad.sdk.** {*;} -keep interface com.buzzvil.buzzad.sdk.** {*;} -keep class com.google.android.gms.common.GooglePlayServicesUtil {*;} -keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {*;} -keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {*;} |
항목 | 코드 & 호출 위치 | 내용 | ||
---|---|---|---|---|
초기화 |
|
| ||
오퍼월 액티비티 호출 View 단위 연동은 아래 확인 View 단위 연동은 아래 확인 |
|
| ||
|
|
| ||
유저 연령 설정 |
| 유저의 출생 년도를 4자리의 숫자로 입력하여 나이를 설정합니다. (예: 1988) | ||
유저 성별 설정 |
| 다음과 같이 미리 정의된 String 형식에 맞춰 성별을 적용해야 합니다.
|
퍼블리셔 앱 내에서 여러 오퍼월을 연동하여, 하나의 액티비티 내에서 버즈빌 오퍼월을 View 단위로 연동하고자 하는 경우
|
public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); /** * Initialize BuzzAd. * BuzzAd.init have to be called prior to other methods. * app_key : Unique key value for publisher. Please find it on your BuzzAd dashboard. * this : Context */ BuzzAd.init("app_key", this); /** * Set User's profile(Optional) * BuzzAd.getUserProfile have to be called after BuzzAd.init is called. */ UserProfile userProfile = BuzzAd.getUserProfile(); userProfile.setBirthYear(1993); userProfile.setGender(UserProfile.USER_GENDER_FEMALE); findViewById(R.id.open_offerwall).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { /** * Show offer wall. * MainActivity.this : Current activity * Get Points : Header title on offer wall * publisher_user_id : Unique user id for publisher */ BuzzAd.showOfferWall(MainActivity.this, "Get Points", "publisher_user_id"); } }); } } |
버즈애드에서 포인트 적립이 발생했을 때 버즈애드에서 직접 매체사 유저들에게 포인트를 지급하는 것이 아닙니다. 버즈애드 서버에서 매체사 서버로 포인트 적립 요청을 보낼 뿐이고, 실제 지급은 매체사 서버에서 처리합니다.
매체사 포인트 적립 포스트백 API 연동 문서를 참고하여 API 연동 후, endpoint url을 버즈빌 매니저에게 전달해주세요. |