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.
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
TedAdmobDialog๋ TedAdHelper์์๋ถํฐ ํ์ด๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์
๋๋ค.
์ด์ ๊น์ง๋ TedAdHelper๋ฅผ ํตํด ๋ฏธ๋์์ด์
์ ํด์ฃผ์์ต๋๋ค.
์๋ํ๋ฉด ์ด์ ๊น์ง Admob์์๋ Native ๊ด๊ณ ์ ๋ํด์๋ ๋ฏธ๋์์ด์
์ ์ง์ํ์ง ์์์๊ธฐ ๋๋ฌธ์
๋๋ค.
ํ์ง๋ง ์ง๊ธ์ Admob์์ Native ๊ด๊ณ ์ ๋ํด์๋ ๋ฏธ๋์์ด์
์ ์ง์ํฉ๋๋ค.
ํ์ง๋ง ๋ค๋ก๊ฐ๊ธฐ๋ฅผ ๋๋ ์๋ ํ์
ํ์์ Dialog๋ก ๋์ค๊ฒ ํ๋๊ฒ์ ์ฌ์ ํ ํ์ํฉ๋๋ค.
TedAdHelper์์๋ ๋ค์ด์ด๋ก๊ทธ๊ฐ ๋ณด์ฌ์ง๊ณผ ๋์์ ๊ด๊ณ ๋ฅผ ์์ฒญํ๊ธฐ๋๋ฌธ์ ๊ด๊ณ ๊ฐ ํ์๋๊ธฐ๊น์ง๋ ์์ฐจ๊ฐ ๋ฐ์ํ์์ต๋๋ค.
TedAdmobDialog๋ ๋ฏธ๋ฆฌ ๊ด๊ณ ๋ฅผ ๋ก๋ฉํด๋๊ณ Dialog๊ฐ ์คํ๋ ๋ ๋ฐ๋ก ๊ด๊ณ ๋ฅผ ๋ณด์ฌ์ค ์ ์๋๋ก ์ง์ํฉ๋๋ค.
Mediation
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
dependencies {
implementation 'gun0912.ted:tedadmobdialog:x.y.z'
}
How to use
0. Type
You can use 2 type advertise
- TedAdmobDialog.AdType.NATIVE: Advanced Native
- TedAdmobDialog.AdType.BANNER: MEDIUM_RECTANGLE Banner
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 includereview
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.```