RoadMap : Admob, Getting Started > Android 요구사항 > Interstitial

Menus : 실습




AdMob의 Interstitial Ads에 대한 번역입니다. 항상 말씀드리지만, 발번역이므로, 이상한 점은 바로 댓글 달아 주세요.





Interstitials

Banners are small ads that when touched typically take the user to some form of full-screen in-app browsing experience.
배너들은 일반적으로 작은 광고를 클릭할 때 앱 전체화면의 인앱을 둘러보게 하는 경험을 하게 합니다.


Interstitials, on the other hand, immediately present rich HTML5 experiences or "web apps" at natural app transition points such as launch, video pre-roll or game level load. Web apps are in-app browsing experiences with a simple close button rather than any navigation bar—the content provides its own internal navigation scheme.
반면, 삽입광고들은 즉시 rich(풍부한 표현이 가능한) HTML5 경험하거나, 예(오른쪽에 그림)와 같이 앱으로 전환점이 되는 웹앱, 비디오 자동재생 또는 게임 수준의 로드 등을 경험하게 합니다. 웹앱들은 광고주가 설정한 삽입광고 탐색 계획에 따른, 인앱 브라우징 경험과 간단한 닫기 버튼, 제공된 내용 입니다.


The richer, more immersive nature of these ads makes them more expensive and subject to impression constraints.
richer, 제한된 주제와 더 비싼 광고를 만드는 특성을 가지고 있습니다. (한마디로 수익성이 좋다는 이야기 인듯 )

 Interstitial ads are supported in the iOS and Android SDKs.
삽입 광고는 iOS와 Android SDKs 에서 지원됩니다.





iOS
Android

InterstitialAd

The richer, more heavyweight nature of InterstitialAd is reflected by its definition not as a View but rather an Object requiring more distinct instantiation, load and display steps.

richer, 더 중압감 있는 삽입 광고는 뷰 만큼 명확히자 않지만, 로드되고 표시되는 단계에서 더 분명한 대상을 반영합니다.


Usage is nevertheless very similar to AdView:
그럼에도 불구하고, 사용법은 AdView와 매우 비슷 합니다. :

  • Import com.google.ads.*
  • Declare the instance
  • Create it, specifying an AdMob Publisher ID distinct from any used for banners

Once again, the easiest place to do this is somewhere in your app’s Activity.
반복하지만(앞에 Banner2에서 언급한 것을 의미함), 앱의 Activity가 이것(위의 코드)을 실행하기 가장 좋은 곳이다.

import com.google.ads.*;

public class BannerExample extends Activity implements AdListener {

 
private InterstitialAd interstitial;

 
@Override
 
public void onCreate(Bundle savedInstanceState) {
   
super.onCreate(savedInstanceState);
    setContentView
(R.layout.main);

   
// Create the interstitial (삽입 광고를 생성합니다.)
    interstitial
= new InterstitialAd(this, MY_INTERSTITIAL_UNIT_ID);

   
// Create ad request (요구 객체를 생성합니다.)
   
AdRequest adRequest = new AdRequest();

   
// Begin loading your interstitial (요구 객체를 로드합니다.)
    interstitial
.loadAd(adRequest);

   
// Set Ad Listener to use the callbacks below (콜백 리스너를 설치합니다.)
    interstitial
.setAdListener(this);
 
}

 
@Override
 
public void onReceiveAd(Ad ad) {
   
Log.d("OK", "Received ad");
   
if (ad == interstitial) {
      interstitial
.show();
   
}
 
}
}

Here we implement AdListener and immediately show the interstitial upon callbacks to onReceiveAd(). See the Intermediate guide for further details on usingAdListener. Alternatively, you can hold onto the interstitial until you're ready to display it, checking with isReady().
이 곳에 우리는 AdListener와 삽입광고의 콜백으로 즉시 보여질 onReceiveAd()를 구성해야 합니다. 더 자세히 AdListener()를 사용하기 위해 Intermediate Guide를 보세요. 그렇지 않으면, 당신이 isReady()체크로 준비가 될때까지 보여지는 것을 잡아 둘수 있습니다.

Once shown, the interstitial takes over the screen until the user dismisses it, at which point control returns to your app.
삽입광고는 사용자가 취소할때까지 화면에 있고, 한지점 컨트롤로 앱으로 돌아가는 것이 한번 표시되는 것이다.

Note: The timeout for an interstitial ad request is five seconds. This timeout pertains to the socket connection with the server, and has no relations to the display duration of the interstitial ad.
참고 : 삽입광고 요청 타임아웃은 5초다. 이 타임아웃은 소켓과 서버의 연결이고, 삽입광고가 표시되는 것과 관련은 없다.

Download the example project.
예제 프로젝트 다운로드.

Posted by 창업자닉군
,

RoadMap : Admob, Getting Started > Android 요구사항 > Banners 2 > 실습





앞서 번역한 'AdMob 예제 Banners 2, Android'를 실습해 본 페이지 입니다.




광고 요청 페이지 작성.

1. 구글 AdMob 사이트 게시자 계정을 생성합니다.

2. AdMob SDK를 계정에 추가합니다.

3. 버튼을 누르면 광고가 호출되도록 광고 요청 페이지를 만듭니다.




구글 광고 이벤트 리스너 추가.

1. 광고는 AdRequest()를 호출 할 때마다 새로 받아 옵니다.

2. loadAd 에 첫 인자로 null 값을 준다면, 광고가 제거됩니다.

3. Activity에 AdListener 인터페이스를 implement 합니다. (com.google.ads.* 이 import 되어 있어야 합니다.)

4. Activity의 OnCreated() 메소드에 adView.setAdListener(this);를 추가 합니다. 주의 할점은 꼭, adview.loadAd(new AdRequest()); 뒤에 리스너를 추가해야 한다는 점입니다. 이유는 모르겠지만, 이 코드가 앞에 있으면 광고를 받지 못하는 현상이 있습니다.

5. 광고 처리 리스너는 5개의 메소드로 구성되어 있습니다.

    - onFailedToReceiveAd : 배너와 풀스크린 광고 (AdMob 서버로 부터)불러오기에 실패했을 때.
    - onReceiveAd : 배너 (AdMob 서버로 부터)성공적으로 불러왔을 때.
    - onPresentScreen : 배너를 클릭해 광고 풀 스크린이 만들어 졌을 때.
    - onLeaveApplication : 풀 스크린 광고 내용을 네트워크로 부터 가져 왔을 때.
    - onDismissScreen : 풀 스크린 광고 창을 닫아 버렷을 때.

6. 실습해 본 예제 소스 : AdMobBanner2.zip



Posted by 창업자닉군
,

RoadMap : Admob, Getting Started > Android 요구사항 > Banners 2

Menus : 실습




안드로이드에 간단히 광고를 넣으려면 Banner 1 예제를 참고 하시면됩니다. 하지만, 더 자세한 컨트롤을 원하신다면, Banner 2  예제, 즉 본 예제를 참고 하시면됩니다. 언제나 항상 말씀드리지만, 번역이 이상할 경우 댓글 달아 주세요. (발 번역입니다. ㅠ,.ㅜ)





Banners II (배너 2)

In this guide, we show you more ways to control banner ad properties.
이 가이드 속에는 배너 속성을 조절하는 더 많은 방법를 보여줍니다.



iOS
Android
Windows Phone 7
  1. Banner Sizes
  2. Ad Refresh
  3. com.google.ads.AdRequest
    1. AdRequest.addTestDevice | AdRequest.setTestDevices
    2. Targeting
  4. com.google.ads.AdListener

Banner Sizes (배너 크기)

Google AdMob Ads supports three tablet-only banner sizes in addition to the 320x50 shown on phones:
구글 애드몹 광고는 3가지 태블릿 전용 배너사이즈와 추가된 320x50 크기의 광고가 폰에 보여지는 것을 지원 :


Size (WxH)DescriptionAvailabilityAdSize Constant
320x50Standard BannerPhones and TabletsBANNER
300x250IAB Medium RectangleTabletsIAB_MRECT
468x60IAB Full-Size BannerTabletsIAB_BANNER
728x90IAB LeaderboardTabletsIAB_LEADERBOARD
See tableSmart BannerPhones and TabletsSMART_BANNER

The SDK will request whatever size the requesting AdView was instantiated with. If there isn't enough space on the device's screen to display the ad, nothing will be shown.

SDK 는 AdView과 인스턴트화 되면 광고 사이즈 요청할 것을 요구할 것이다. 장치의 화면에 광고가 보여질 공간이 없다면, 광고가 보여지지 않을 것이다.

Ad Refresh (광고 리프레쉬)

Banners auto-refresh if a refresh rate has been specified in your AdMob account on the server and may be programmatically refreshed by loading a new request.
서버 애드몹 계정에 리프레쉬 값이 지정하면 자동 새로고침이 되고, 새 요청에 의한 로드로 프로그래밍 리프레쉬를 할 수있습니다.


com.google.ads.AdRequest

Before being passed to AdView.loadAd an AdRequest may be customized to allow Google to better target ads.
AdView.loadAd에 AdRequest가 전달 되기전에 더 좋은 타겟 광고를 허용하는 것을 선택 할 수 있습니다.


AdRequest.addTestDevice | AdRequest.setTestDevices

You can use these properties to to specify a device or Set of devices that will receive test ads. You should utilize this property during development to avoid generating false impressions. To verify that you've integrated the SDK correctly, add your test device, run your application, and click on the displayed test ad.
이러한 속성으로 장치나 장치들의 셋트를 지정할 수 있고, 지정된 장치들은 테스트 광고를 받을 수 있게 됩니다. 당신은 잘못된 (광고의)노출이 생기는 것을 피하기 위해 앞에서 말한 속성을 개발하는 동안 사용해야 합니다. 제대로된 통합된 SDK를 가지고 있는지, 테스트 장치를 추가했는지, 애플리케이션이 동작하는지, 표시된 광고위에 클릭 되는 것을 확인해야 합니다.


AdRequest request = new AdRequest();

request
.addTestDevice(AdRequest.TEST_EMULATOR);
request
.addTestDevice("E83D20734F72FB3108F104ABC0FFC738");    // My T-Mobile G1 test phone

logcat will print the device's MD5-hashed ID for convenience, for example: 
   To get test ads on this device, call adRequest.addTestDevice("E83D20734F72FB3108F104ABC0FFC738");
예제의 결과로, 로그켓에 장치의 MD5-hashed ID를 간편하게 출력할 것이다.
    '
adRequest.addTestDevice("E83D20734F72FB3108F104ABC0FFC738")'를 호출해서 이 장치 위에 테스트 광고를 가져 온다.

Targeting (광고를 볼 사람의 정보로 필요할 것 같은 광고를 찾는 것을 의미 합니다.)

Location and demographic targeting information may also be specified. Out of respect for user privacy, Google asks that you only specify location and demographic data if that information is already used by your app.
장소와 인구 통계학 등의 대상 정보 도 지정할 수 있습니다. 개인의 정보를 소중히 여기며, 구글은 오직 지정된 장소와 인구 통계학 데이터를 요청하며, 그것은 이미 앱에 사용된 정보들입니다.


AdRequest request = new AdRequest();

request
.setGender(AdRequest.Gender.FEMALE);
request
.setLocation(location);
request
.setBirthday("19850101");

where the user's location is obtained by a suitable method.
여기서 사용자의 위치는 적절한 방법으로 얻을 수 있습니다.

com.google.ads.AdListener

You may optionally track ad lifecycle events like request failures or "click-through" by implementing com.google.ads.AdListener in an object you pass to AdView.setAdListener.
당신은 당신이 AdView.setAdListener에 전달한 객체 속 구현된 com.google.ads.AdListener를 통해 요청실패 또는 클릭을 통한 이벤트의 광고수명주기를 선택적으로 추적할 수 있습니다.

public interface AdListener {
 
public void onReceiveAd(Ad ad);
 
public void onFailedToReceiveAd(Ad ad, AdRequest.ErrorCode error);
 
public void onPresentScreen(Ad ad);
 
public void onDismissScreen(Ad ad);
 
public void onLeaveApplication(Ad ad);
}

This interface may be implemented by your activity or any other object:
이 인터페이스는 activity 또는 다른 객체에 구현 될 수 있습니다.

import com.google.ads.*;

public class BannerExample extends Activity implements AdListener {
}

and then passed to the Ad:
그리고 광고가 전달될 때 :

adView.setAdListener(this);
public void onReceiveAd(Ad ad)
Sent when AdView.loadAd has succeeded.
AdView.loadAd가 성공했을 때, 전송 (불러집니다.)

public void onFailedToReceiveAd(Ad ad, AdRequest.ErrorCode error)
Sent when loadAd has failed, typically because of network failure, an application configuration error, or a lack of ad inventory. You may wish to log these events for debugging:

loadAd가 실패했을 때, 일반적인 네트워크 실패, 애플리케이션 구성 오류, 또는 광고 인벤토리가 부족할 때  불려집니다. 당신은 디버깅을 위해 이러한 이벤트 기록을 원할 수 있을 것이다 :

@Override
public void onFailedToReceiveAd(Ad ad, AdRequest.ErrorCode errorCode) {
 
Log.d(MY_LOG_TAG, "failed to receive ad (" + errorCode + ")");
}
public void onPresentScreen(Ad ad)
Called when an Activity is created in front of your app, presenting the user with a full-screen ad UI in response to their touching ad.
당신의 앱 속에 액티비티가 생성된 뒤, 터치 광고의 응답에 풀스크린 광고가 사용자에게 보여질 때 불리어 집니다.


public void onDismissScreen(Ad ad)
Called when the full-screen Activity presented with onPresentScreen has been dismissed and control is returning to your app.
전체화면 액티비티에 onPresentScreen이 기각(실행되지 않음) 되어, 컨트롤이 당신의 앱으로 되돌아 갈 때 불리어 집니다.


public void onLeaveApplication(Ad ad)
Called when an Ad touch will launch a new application.
광고 터치로 새 앱이 시작될 것이며, 그때 호출됩니다.

You can download an example project containing a sample AdListener here.
다은은 샘플 AdListener가 포함된 예제 프로젝트를 여기서 다운로드 할 수 있습니다.

Posted by 창업자닉군
,