RoadMap : Admob, Getting Started > Android 요구사항 > Ad Network Mediation - Publisher Instructions

Menus : 실습




본 예제는 https://developers.google.com/mobile-ads-sdk/docs/admob/mediation 페이지의 내용을 번역한 페이지 입니다. 이상한 내용이 있을 경우 댓글을 남겨 주세요.



Ad Network Mediation - Publisher Instructions

(광고 네트워크 중계 - 게시자 설명서)



See this article for a walk-through of what mediation is and how to use the AdMob Mediation UI. Then, continue reading this page for instructions on how to add mediation code into your app.
메디에이션이 무엇인지와 메디에이션 UI 사용 방법에 관한 단계별 설명은 이 문서를 보세요. 당신에 앱에 광고 메디에이션 코드를 추가하는 방법은 이페이지를 읽고 계속합니다. - 위의 article 링크를 클릭하면, 메디에이션 광고에 관한 설명이 되어 있습니다. 이 문서를 읽고 계속보라는 이야기 입니다. 한글로 되어 있으니 한 번씩 읽어 보시기 바랍니다.

Mediation is available for iOS and Android.
메디에이션 (우리말로 광고 중계지만, 이 문서에서는 메디에이션이라 하겠습니다. 단, Ad Mediation은 광고 중계로 번역하겠습니다.)은 iOS와 Android만 가능합니다.



Adding the Mediation SDK to your project

1. Integrate AdMob ads (애드몹 광고 통합)

Follow the same instructions used for integrating AdMob ads into your application. To integrate non-interstitial ads (banner size, leaderboard size, and so on), follow the fundamental instructions. To integrate interstitial ads (full-screen ads that take over the screen), follow the advanced instructions.
당신의 앱에 광고를 통합하는 사용설명서를 따라 하세요. 비 삽입광고(배너 사이즈, 리더보드 사이즈, 등등) 통합은 기본 설명서를 따라 하세요. 삽입광고(스크린 전체에 광고를 띄우는) 통합은 전문적인 설명서를 따라하세요.

Once you’ve followed these integration instructions, you’ll make a few modifications described below to change your AdMob ad placement into a mediation placement that can show ads from multiple networks.
통합설명서를 한번 따라하면, 아래의 내용에 따라 애드몹 광고 가져오기를 메디에이션 가져오기로 약간 수정하는 것으로 다중 네트워크로 부터오는 광고를 볼수 있습니다. (대충 이런 뜻 인데, 한글로 옮기기 쉽지가 않네요.)



2. Add network adapters and SDKs (네트워크 어댑터와 SDK들 추가)

You're now ready to download and add to your project the adapters and SDKs of all the ad networks you'd like to serve ads from (AdMob is already included in the Mediation SDK). You can find links to them on the ad network mediation page. 광고 네트워크 중계(ad network mediation) 페이지에서 링크를 찾을 수 있습니다.
모든 광고 네트워크의 어댑터와 SDK들 다운로드하고 프로젝트에 추가하는 것으로 광고를 제공할 준비가 끝납니다.(애드몹은 메디에이션 SDK에 이미 삽입되어 있습니다.) 

To add the downloaded network adapters/SDKs in Eclipse, right click on your project and select Properties. Then add all the JAR files to your Java Build Path.
다운로드된 프로젝트위에서 우클릭해 프로퍼티를 선택해 네트워크 어뎁터/SDKs를 이클립스에 추가합니다. 이때 모든 JAR 파일을 Java Build Path에 추가합니다.

Note: You may consider integrating adapters and SDKs from networks that you’re not currently using but might use in the future. If you do this, you’ll be able to start serving ads from these networks simply by making a configuration change on mediation.admob.com (without requiring a code change to your app). Weigh this against the increase in app binary size that each additional SDK will add.
주의:  당신은 현재는 사용하지 않지만 차후 네트워크로 부터 어댑터 및 SDKs의 통합을 고려해 볼 수 있습니다. 만약 당신이 이것을 한다면, mediation.admob.com에서 변경하는 것으로 간단히 네트워크로 부터 광고를 제공할 수 있을 것입니다.(당신의 앱에서 코드를 변경할 필요가 없습니다.)이것은 각각 SDK를 추가하는 형태로 추가해 앱 바이너리 크기가 늘어 불리합니다.

3. Configure ad networks in AndroidManifest.xml ('AndroidManifest.xml'광고 네트워크 구성)

You now need to add entries to your AndroidManifest.xml as required by each ad network you intend to use. Instructions from each network can be found from the ad network mediation page. Follow the parts of these instructions related to modifying your AndroidManifest.xml file.
당신의 AndoridManifest.xml에 당신이 사용하기 원하는 바 데로 각각의 광고네트워크가 요구한 진입점을 추가해 해야합니다. 광고 네트워크 중계 페이지(ad network mediation page)로 부터 각각의 네트워크 사용법을 찾을 수 있습니다. 이 파트의 관계된 설명을 따라 당신의 AndroidManifest.xml 파일을 수정하세요.

Note that you only need to modify your manifest, and that there is no need to follow the networks' instructions for creating ad views or setting up listeners. The AdMob Mediation SDK will invoke each ad network's adapters and SDKs as necessary to create ads. Further below you'll see how to set up Mediation listeners that notify you of ad events for all of your networks.
광고뷰를 생성 또는 셋팅된 리스너를 위해 당신이 필요로 하는 manifest만 변경하고, 필요하지 않는 것은 네트워크 설명에 따라야 함을 주의 하세요. AdMob 중계 SDK는 방법에 각각의 광고생성에 필요한 네트워크 어뎁터와 SDK들의 사용법을 따라 줄 것을 요구합니다. 아래로 좀더 내려면 모든 네트워크 광고 이벤트 알림 Mediation 리스너 설치 방법을 볼수 있습니다.



4. Convert AdMob into mediation placement (광고제공을 애드몹으로변경)

The final mandatory step is to change your AdMob ad placement into a mediation placement by modifying a few parameters.
약간의 값을 조정함으로써 메디에이션에서 제공되는 광고를 애드몹 광고로 변경하는 마지막 과정입니다.

  1. a) For banner placements (including tablet sizes)
  2. b) For interstitial placements

a) For banner placements (배너 제공을 위해)

Make the following change to your AdView: (AdView을 (아래 보기를)따라서 변경하세요.)

Specify your Mediation ID instead of your AdMob site ID in the constructor of your AdView. Your Mediation ID can be found on the settings page of the mediation placement you’ve created:
당신의 AdView의 생성자에 애드몹 사이트 ID를 지정된 메디에이션 ID로 대체하세요. 당신이 만든 메이에이션 (광고)제공 셋팅 페이에서 메디에이션 ID는 찾을 수 있습니다.

You might instantiate your AdView in this way, for example:
AdView에 넣는 방법을 예를 들어 설명합니다.

AdView adView = new AdView(this, AdSize.BANNER, "e123456789012345");

where e123456789012345 is your Mediation ID.
여기서 e123456789012345는 당신의 메디에이션 ID 입니다.

Note: AdMob Ad Network Mediation does not fully support Smart Banners currently.
주의 : AdMob  광고 네트워크 중계는 스마트 배너 연결을 완전히 지원하지 않습니다.

Load the ad exactly as you would load an AdMob ad. Make sure to put the adView into your layout by calling
광고 로드는 AdMob 로드와 완벽히 같을 것이다. 반드시 호출을 통해 AdView를 (액티비티)layout 속에 넣으세요.

layout.addView(adView);

where layout is a reference to your layout.
당신의 layout에 이 레이아웃을 참고하세요.

You would then load an ad by calling adView.loadAd(new AdRequest());
당신이 원할 때 'adView.loadAd(new AdRequest());'를 호출해 광고를 로드 할 수 있을 것이다.

Alternatively, you can specify your ad view in an XML layout.
바꿔, XML layou 속에서도 ad view를 지정할 수 있다

b) For interstitial placements (삽입광고 제고을 위해)

  1. Specify your Mediation ID instead of your AdMob site ID in the constructor of your InterstitialAd. You might instantiate your InterstitialAd like this, for example:

    Interstitial(삽입광고)의 생성자 속에 당신의 메디에이션 ID를 AdMob 사이트 ID를 대신해 지정하세요. 당신의 예를 보자면, 아래 예제와 같을 것입니다.

    interstitial = new InterstitialAd(this, "e987654321098765");
    interstitial
    .setAdListener(this);
  2. Load the interstitial exactly as you would load an AdMob interstitial, for example:
    예제의 삽입광고 로드는 애드몹 삽입광고와 완전히 같습니다.

    interstitial.loadAd(new AdRequest());

  3. Implement a listener to be notified when the ad has fully loaded so that you can then show it. Alternatively, you can call the isReady() method on yourInterstitialAd to poll for whether the ad is ready to be displayed.
    광고가 충분히 로드되고 알림이 발생하면 구성된 리스너로 볼 수 있습니다. 그렇지 않으면, 삽입광고에서 'isReady()' 메소드 호출해 광고가 보여질 준비가 되었는지 조사할 수 있습니다.

    public class MyActivity extends Activity implements AdListener {
       
    private InterstitialAd interstitial;
       
    [ . . . ]
    public void onReceiveAd(Ad ad) {
         
    // Be sure to check that it is an InterstitialAd that triggered this
         
    // callback. Also, if there are multiple InterstitialAds, make sure
         
    // it is the correct one.
         
    if (ad == interstitial) {
           
    // For best performance, make sure you are not performing
           
    // processor-intensive or media-intensive operations while showing
           
    // interstitial ads.
           interstitial
    .show();
         
    }

    OR

    /*Placed when a user is at a natural stopping point, such as in between levels of a game*/
    if (interstitial.isReady()) {
        interstitial
    .show();
    }

    Note: Latency can be substantial when mediating interstitial ads. It can take a second or two for each network's request to fail. When a request succeeds, it can then take five seconds or more to fully load the graphical or video assets. Speed will differ on a carrier connection versus a wifi connection. For this reason, we recommend fetching an interstitial early on, and holding on to the interstitial so that it can be displayed at an appropriate time. We do not recommend trying to mediate an interstitial ad at app-open time, and putting users through a long wait screen as the interstitial tries to load.

    주의 : 삽입광고를 중계할 때 상당히 지연 될 수 있습니다. 각각 네트워크 요청 실패로 두번째 혹은 두번 보낼 수 있습니다. 요청에 성공한 때, 그것을 완벽히 로드됩니다. 요청에 성공하면, 그래픽 또는 비디오 자원이 오나진히 로드되는 데, 5초 또는 그 이상 걸릴 수 있습니다. 캐리어 연결(스마트폰 3G를 뜻하는 듯)과 와이파이 연결은 속도가 다를 것이다. 이런 이유는 우리가 초기에 삽입광고를 잡아두고 매력적인 광고를 추천하고, 적절한 때 삽입 광고를 볼 수 있기 때문이다. 우리는 앱 오픈 시간에는 삽입광고 중계를 추천 시도를 하지않으며, 유저의 긴 대기 화면대기 시간에 삽입광고 로드를 시도하게 (배치;putting)했다.


Posted by 창업자닉군
,