Git Product home page Git Product logo

tedadmobdialog's Introduction

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

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



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()
 nativeTedAdmobDialog = new TedAdmobDialog.Builder(this, TedAdmobDialog.AdType.NATIVE, AD_TEST_KEY_NATIVE)
         .setOnBackPressListener(new OnBackPressListener() {
             @Override
             public void onReviewClick() {

             }

             @Override
             public void onFinish() {
                 finish();
             }

             @Override
             public void onAdShow() {
                 nativeTedAdmobDialog.loadAd();
             }
         })
         .create();

 nativeTedAdmobDialog.loadAd();
  • When advertise shown, pre load again in onAdShow()

2. Show TedAdmobDialog

  • When you need to show advertise, call TedAdmobDialog::show()
indViewById(R.id.btn_native).setOnClickListener(new View.OnClickListener() {
   @Override
   public void onClick(View v) {
       nativeTedAdmobDialog.show();
   }
});

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

Copyright 2018 Ted Park

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.```

tedadmobdialog's People

Contributors

parksanggwon avatar ted-prnd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tedadmobdialog's Issues

Example for Kotlin

Dear Sanggwon,

Thanks for your great library.

Could you please add Kotlin example?

How to preload Admob Banner

Hi @ParkSangGwon ,

I want to show dialog exit with Admob Banner. I tested and it take time to loading the ads while the progress dialog is showing. Is there any way to preload the ad first to let it show immediately instead waiting it to show. Thanks.

loadNative() is private issue

Dear SangGwon,

Thanks for your great work!!

version 1.0.5 has an issue of calling loadNative() with error since it is defined with private.

No issue with module import, but has error with gradle implementation.

Thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.