android - How to add threshold to interstitial? -
i have problem interstitial. how can add threshold interstitial ?
private void setupinterstitial() { minterstitialad = new interstitialad(this); minterstitialad.setadunitid("ca-app-pub-xxxxxxxxxxxxxxxxxxxxxxxxx"); requestnewinterstitial(); } private void requestnewinterstitial() { adrequest adrequest = new adrequest.builder() .addtestdevice("see_your_logcat_to_get_your_device_id") .build(); minterstitialad.loadad(adrequest); } protected void bindviews() { butterknife.bind(this); setuptoolbar(); } protected void setuptoolbar() { if (mtoolbar != null) { setsupportactionbar(mtoolbar); } mnavigationview.setnavigationitemselectedlistener(mnavigationlistener); mdrawertoggle = new actionbardrawertoggle(this, mdrawerlayout, r.string.hello_world, r.string.hello_world); mdrawerlayout.setdrawerlistener(mdrawertoggle); } public toolbar gettoolbar() { return mtoolbar; } protected void sethamburgerbutton() { actionbar actionbar = getsupportactionbar(); if (actionbar != null) { getsupportactionbar().sethomebuttonenabled(true); getsupportactionbar().setdisplayhomeasupenabled(true); } } @override public void onbackpressed() { super.onbackpressed(); if (minterstitialad.isloaded()) { minterstitialad.show(); } }
- go admob -> monetize tab
- find ad unit
- click on edit
- set threshhold (frequency capping)
- save
the edit ad unit page show can set threshhold.

Comments
Post a Comment