项目作者: ParkSangGwon

项目描述 :
[Android]BackPress Ad Dialog for Admob
高级语言: Java
项目地址: git://github.com/ParkSangGwon/TedAdmobDialog.git
创建时间: 2018-04-27T17:48:04Z
项目社区:https://github.com/ParkSangGwon/TedAdmobDialog

开源协议:

下载


What is TedAdmobDialog?

English

TedAdmobDialog come from TedAdHelper

Until then, we could only do Mediation through TedAdHelper.

Becoz Admob did not support Native ad type.

But nowdays Admob support Native ad type.

But we still need back press dialog like this.

Screenshot

When you use TedAdHelper’s back press dialog, you have need request and loading advertise time.

Because the request is made at the same time the dialog is shown.

TedAdmobDialog support pre advertise request.

So you can see the dialog and show ads at the same time.





Korean

TedAdmobDialogTedAdHelper에서부터 태어난 라이브러리입니다.

이전까지는 TedAdHelper를 통해 미디에이션을 해주었습니다.

왜냐하면 이전까지 Admob에서는 Native 광고에 대해서는 미디에이션을 지원하지 않았었기 때문입니다.

하지만 지금은 Admob에서 Native 광고에 대해서도 미디에이션을 지원합니다.

하지만 뒤로가기를 눌렀을때 팝업형식의 Dialog로 나오게 하는것은 여전히 필요합니다.

Screenshot

TedAdHelper에서는 다이어로그가 보여짐과 동시에 광고를 요청하기때문에 광고가 표시되기까지는 시차가 발생했었습니다.

TedAdmobDialog는 미리 광고를 로딩해두고 Dialog가 실행될때 바로 광고를 보여줄 수 있도록 지원합니다.





Mediation

Screenshot

I recommend you have to use mediation.

If you use mediation, you can earn more money using highest eCPM network.

See this document.

https://developers.google.com/admob/android/mediation

I use admob, facebook audience network network.





Setup

Gradle

Download

  1. dependencies {
  2. implementation 'gun0912.ted:tedadmobdialog:x.y.z'
  3. }



How to use

0. Type

You can use 2 type advertise

1. Pre loading

  • Make your TedAdmobDialog instance.
  • And pre load advertise using TedAdmobDialog::loadAd()
    ```java
    nativeTedAdmobDialog = new TedAdmobDialog.Builder(this, TedAdmobDialog.AdType.NATIVE, AD_TEST_KEY_NATIVE)

    1. .setOnBackPressListener(new OnBackPressListener() {
    2. @Override
    3. public void onReviewClick() {
    4. }
    5. @Override
    6. public void onFinish() {
    7. finish();
    8. }
    9. @Override
    10. public void onAdShow() {
    11. nativeTedAdmobDialog.loadAd();
    12. }
    13. })
    14. .create();

    nativeTedAdmobDialog.loadAd();

  1. - When advertise shown, pre load again in `onAdShow()`
  2. ### 2. Show TedAdmobDialog
  3. - When you need to show advertise, call `TedAdmobDialog::show()`
  4. ```java
  5. indViewById(R.id.btn_native).setOnClickListener(new View.OnClickListener() {
  6. @Override
  7. public void onClick(View v) {
  8. nativeTedAdmobDialog.show();
  9. }
  10. });

Customize

  • setStartMute(): If you want muted advertise, call this function in builder.
  • showReviewButton(): Dialog include review button. you can control review button’s visibility.

License

  1. Copyright 2018 Ted Park
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.