애드팝콘 SSP SDK 연동가이드
애드팝콘 홈페이지애드팝콘 SSP 콘솔 바로가기
  • 개요
  • Android
    • 기본 설정
    • 배너 광고
    • 전면 광고
    • 전면 비디오 광고
    • 리워드 비디오 광고
    • 보상형 광고 플러스 연동(beta)
    • 네이티브 광고
      • 네이티브 광고 레이아웃 구성 가이드
        • AdPopcornSSP NativeAdView
    • 스플래시 광고
    • 모달 광고
    • 팝콘텐츠 광고
    • 응답 에러 코드 및 샘플 프로젝트
    • 미디에이션(Android)
      • AdFit
      • Admob
      • AdForus
      • ADOP
      • GAM (Google Ad Manager)
      • Cauly
      • FAN(Facebook Audience Network)
      • MezzoMedia
      • Mintegral
      • Mobwith
      • UnityAds
      • Vungle(LiftOff)
      • Fyber
      • Pangle
      • AppLovin
      • AppLovinMax
      • NAM (Naver Ad Manager)
      • CoupangCPM
    • AppLovin Max Android Mediation 가이드
    • 릴리즈 노트
  • iOS
    • 기본 설정
      • CocoaPod 설치
      • SPM 설치
      • 수동 설치
    • 배너 광고
    • 전면 광고
    • 전면 비디오 광고
    • 리워드 비디오 광고
    • 보상형 광고 플러스 연동(beta)
    • 네이티브 광고
      • NativeAdView layout
        • 직접 설정
        • 템플릿 사용
    • 스플래시 광고
    • 모달 광고
    • 팝콘텐츠 광고
    • 응답 에러 코드 및 샘플 프로젝트
    • 미디에이션
      • NAM (Naver Ad Manager)
      • AdFit
      • AppLovin
      • AppLovinMAX
      • UnityAds
      • Vungle
      • FBAudienceNetwork (FaceBook)
      • AdMob
      • Google AdManager(GAM)
      • ADOP
      • Fyber
      • Mezzo
      • Mintegral
      • Pangle
      • Cauly
      • SDK, Mediation ver 호환성
    • AppLovin Max iOS Mediation 가이드
    • 릴리즈노트
  • Unity
    • Unity (Android)
      • 기본 설정
      • 배너 광고
      • 전면 광고
      • 리워드 비디오 광고
      • 네이티브 광고
      • 보상형 광고 플러스 연동(beta)
      • 미디에이션 Unity Android
    • Unity (iOS)
      • 기본 설정
      • 배너 광고
      • 전면 광고
      • 리워드 비디오 광고
      • 네이티브 광고
      • 보상형 광고 플러스 연동(beta)
      • 미디에이션 Unity iOS
    • 에러 코드
  • Flutter
    • 기본 설정
    • 배너 광고
    • 전면 광고
    • 전면 비디오 광고
    • 리워드 비디오 광고
    • 보상형 광고 플러스 연동(beta)
    • 네이티브 광고
    • 팝콘텐츠 광고
  • React Native(beta)
    • 기본 설정
    • 배너 광고
    • 전면 광고
    • 전면 비디오 광고
    • 리워드 비디오 광고
    • 네이티브 광고
  • Web SDK
  • 하이브리드 앱 - Web(APM + NAM)
    • 네이티브 Side 연동(Android)
    • 네이티브 Side 연동(iOS)
    • WebPage Side 연동
    • 광고 ID 수동 세팅
  • 하이브리드 앱- Web(Adfit)
    • Android
    • iOS
  • 테스트 코드
  • 리포트 API
    • 애드팝콘 SSP Report API
    • DSP Report API
    • Publisher API (Report)
    • Publisher API (Metadata)
    • Adserver Report API
    • Popcontent Report API
  • 추가 기능 연동가이드
    • Adfit Bizboard Android 연동 가이드
    • 웹 CS 페이지 연동
    • AppLovin Custom Network
      • Android
      • iOS
    • KT Library
    • 원스토어 연동가이드
      • 애드팝콘 SSP SDK for Onestore
      • 원스토어 Ads 래핑 가이드(내부용)
        • 배너 광고
        • 전면 광고
        • 전면 비디오 광고
        • 리워드 비디오 광고
        • 네이티브 광고
        • SSP 미디에이션
        • 에러 코드 및 외부 노출 함수
        • 테스트 지면 키
        • AAR 라이브러리 목록
    • 쿠팡 연동가이드
      • 쿠팡 포스트백 연동
      • 쿠팡 EP 리스트 연동
      • 쿠팡 리포트 API 연동
        • 쿠팡 일별 리포트 API
        • 쿠팡 API - Report
        • 쿠팡 API - Product list
    • Reward Banner 스크립트 연동가이드
      • Reward Banner 스크립트 Android
      • Reward Banner 스크립트 iOS
    • 차단관리 파일 가이드
    • 커스텀 타입 연동 가이드
      • 커스텀 타입(Android)
      • 커스텀 타입(iOS)
    • 쿠팡 클릭 이벤트 페이지 연동 가이드
  • 팝콘텐츠 연동가이드
    • WebView 직접 연동
    • 리워드 콜백
  • 웹 SSP
    • 쿠키 매칭
    • Web Header Bidding(WIP)
Powered by GitBook
On this page
  • 일반 네이티브
  • AdPopcornSSPNativeAdTemplate 설정
  • 2) Native Asset 연결

Was this helpful?

  1. Android
  2. 네이티브 광고
  3. 네이티브 광고 레이아웃 구성 가이드

AdPopcornSSP NativeAdView

애드팝콘 네이티브 뷰 설정을 진행합니다.

애드팝콘 네이티브의 경우 일반 네이티브와 AdPopcornSSPNativeAdTemplate 방식을 지원하므로, 매체에서 사용하고자 하는 방식에 맞게 연동을 진행해 주세요.

일반 네이티브

  • native_ad_layout.xml 샘플

<com.igaworks.ssp.part.nativead.AdPopcornSSPNativeAd
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/adpopcorn_native_ad"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
​
    <!-- AdPopopcorn SSP-->
    <include
        android:id="@+id/adpopcorn_native_ad_view"
        layout="@layout/adpopcorn_native_ad_unit_layout"/>

</com.igaworks.ssp.part.nativead.AdPopcornSSPNativeAd>
  • adpopcorn_native_ad_unit_layout.xml 샘플

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:gravity="center"
    android:background="#FFFFFF">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:orientation="horizontal"
        android:background="#FFFFFF">
        <ImageView
            android:id="@+id/apssp_native_ad_icon_image1"
            android:layout_width="60dp"
            android:layout_height="60dp"
            android:layout_margin="10dp"/>
        <LinearLayout
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_gravity="center"
            android:orientation="vertical">
            <TextView
                android:id="@+id/apssp_native_ad_title1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="#000000"/>
            <TextView
                android:id="@+id/apssp_native_ad_desc1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:maxLines="2"
                android:textColor="#000000"/>
        </LinearLayout>
        <TextView
            android:id="@+id/apssp_native_ad_ctatext1"
            android:layout_width="60dp"
            android:layout_height="30dp"
            android:layout_marginTop="25dp"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:background="#3d7caf"
            android:textColor="#ffffff"
            android:textColorHint="#ffffff"
            android:gravity="center"
            android:textSize="16sp" />
    </LinearLayout>
    <ImageView
        android:id="@+id/apssp_native_ad_main_image1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>
</LinearLayout>

xml에서 생성한 ui component를 sdk에서 제공하는 setAdPopcornSSPViewBinder API를 이용해 아래와 같이 설정해 줍니다.

AdPopcornSSPViewBinder adpopcornSSPViewBinder 
= new AdPopcornSSPViewBinder.Builder(R.id.adpopcorn_native_ad_view, R.layout.adpopcorn_native_ad_unit_layout)
        .iconImageViewId(R.id.apssp_native_ad_icon_image1)
        .descViewId(R.id.apssp_native_ad_desc1)
        .mainImageViewId(R.id.apssp_native_ad_main_image1)
        .titleViewId(R.id.apssp_native_ad_title1)
        .callToActionId(R.id.apssp_native_ad_ctatext1)
        .build();

adpopcornSSPNativeAd.setAdPopcornSSPViewBinder(adpopcornSSPViewBinder);

AdPopcornSSPViewBinder Builder 생성 시, view id(R.id.adpopcorn_native_ad_view)와

layout id(R.layout.adpopcorn_native_ad_unit_layout)는 필수로 넘겨주어야 하며, 그 외 ui component에 대해서는 사용하는 리소스에 대해서만 설정해 주면 됩니다.

AdPopcornSSPNativeAdTemplate 설정

AdPopcornSSPNativeAd View 안에 AdPopcornSSPNativeAdTemplate 뷰를 추가해 줍니다.

<?xml version="1.0" encoding="utf-8"?>
<com.igaworks.ssp.part.nativead.AdPopcornSSPNativeAd
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/adpopcorn_native_ad"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <!-- AdPopcorn SSP Template View -->
    <com.igaworks.ssp.part.nativead.view.AdPopcornSSPNativeAdTemplate
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/adpopcornssp_native_ad_template"/>
        
</com.igaworks.ssp.part.nativead.AdPopcornSSPNativeAd>

2) Native Asset 연결

xml에 생성한 resource id를 setAdPopcornSSPViewBinder API를 이용하여 아래와 같은 방식으로 매칭합니다.

AdPopcornSSPViewBinder adPopcornSSPViewBinder = new AdPopcornSSPViewBinder.Builder(R.id.adpopcornssp_native_ad_template)
                .useTemplate(true)
                .build();
adPopcornSSPNativeAd.setAdPopcornSSPViewBinder(adPopcornSSPViewBinder);

AdPopcornSSPViewBinder Builder 생성 시, useTemplate 값을 true로 설정해 주시고,

Builder에 AdPopcornSSPNativeAdTemplate View id를 넘겨줍니다.

Previous네이티브 광고 레이아웃 구성 가이드Next스플래시 광고

Last updated 10 days ago

Was this helpful?