AdMob Interstitial Example for Non-Game Developers

199 views
Skip to first unread message

Nikin Sk

unread,
May 27, 2015, 8:31:20 AM5/27/15
to google-adm...@googlegroups.com
AdMob doc provides fruitful examples for interstitial ads. Most examples made for game developers , but I would like to implement interstitial ad on my educational app. Is there any official example? 

Thanks Google Ads Team.   

Kunal Verma

unread,
May 27, 2015, 9:04:39 AM5/27/15
to google-adm...@googlegroups.com
The documentation in this link is for all types of app developers - https://developers.google.com/mobile-ads-sdk/docs/admob/android/interstitial

And will be perfect for your project if you are building it on Android. 
Get official interstitial sample from github - https://github.com/googleads/googleads-mobile-android-examples/tree/master/admob/InterstitialExample

This link explains greatly on when and where to include interstitial ads properly with a vidoe- https://support.google.com/admob/answer/6066980?hl=en

On Wed, 27 May 2015 at 18:01 Nikin Sk <nikin...@gmail.com> wrote:
AdMob doc provides fruitful examples for interstitial ads. Most examples made for game developers , but I would like to implement interstitial ad on my educational app. Is there any official example? 

Thanks Google Ads Team.   

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nikin Sk

unread,
May 27, 2015, 10:32:46 AM5/27/15
to google-adm...@googlegroups.com
Thank you, My app has clear end points. let me know Is this a best practice for educational app. 

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_advanced);
        mInterstitialAd = new InterstitialAd(this);
mInterstitialAd.setAdUnitId(getString(R.string.ad_unit_interstitial));
requestNewInterstitial();
mInterstitialAd.setAdListener(new AdListener() {

public void onAdClosed() {
requestNewInterstitial();

}

});
 startLesson.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View arg0) {

// TODO Auto-generated method stub
if (mInterstitialAd != null && mInterstitialAd.isLoaded()) {
mInterstitialAd.show();
} else {
Toast.makeText(ContentViewer.this, "Ad is not ready",
Toast.LENGTH_SHORT).show();

}
} }}
private void requestNewInterstitial() {
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice("DEVICE-ID")
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR).build();

mInterstitialAd.loadAd(adRequest);
}


mobileadssdk-...@google.com

unread,
May 27, 2015, 3:27:41 PM5/27/15
to google-adm...@googlegroups.com, nikin...@gmail.com
Hi Nikin,
Thanks for reaching out. Your implementation looks good. I assume you're using the Toast just during development :).

Kunal, as always thanks for answering.

Thanks,
Elton

Nikin Sk

unread,
May 27, 2015, 10:42:11 PM5/27/15
to google-adm...@googlegroups.com
Thanks for quick response, Special Thanks to Elton for checking the snippet. I will remove the toast message in production. 
also thanks kunal


Thanks
NIKIN 


On Wednesday, May 27, 2015 at 6:01:20 PM UTC+5:30, Nikin Sk wrote:

budy nan

unread,
Jun 1, 2015, 1:08:33 PM6/1/15
to google-adm...@googlegroups.com
hi, 

i have a doubt about admob banner id &  interstitial ID integration in two different apps of two different publishers, my friend recently published one android game, i recently published android app.He integrated my banner ID with his interstitial ID in his game.Now he lost his source files, He have no chance to update,Will admob pay amount to us ? Is admob will reject our admob accounts?Can we continue with that.

On Wednesday, May 27, 2015 at 6:01:20 PM UTC+5:30, Nikin Sk wrote:
Reply all
Reply to author
Forward
0 new messages