Bubble Ads Integration Guide

  • Android SDK 2.3 (Version 9) and above
  • Android Support Library 21.0.3 and above

 

 

Step I: Adding the Tooleap Ads SDK gradle dependencies to your project

Add the following lines into your build.gradle file:

Also add a compile dependency for each of the ad network you wish to display ads from. For example, for Facebook Audience Network add the following dependency:

Note: If you don’t use gradle build system you can download the latest jar files directly from our github repository.

 

Step II: Manifest Changes

Add the following permissions to your AndroidManifest.xml file:

 

Tooleap displays ads from third party ad networks. In order to display ads, you need to create an account in the appropriate ad network site.

Download the appropriate jars and add a compile dependency for each of the ad network you wish to display ads from.

 

Facebook Audience Network

Min API Requirement: 11

Sign-in to Audience Network and create an account if you haven’t already done so. After you created an account and verified it, create a Native Ad Placement inside your Facebook Audience Network App page.

Add the newly created Placement Id to the Tooleap Ads dashboard, and add the following dependencies to the build.gradle file:

consult the Facebook Audience Network Getting Started Guide on how to create you account.

 

Admob

Min API Requirement: 19

Sign-in to Admob and create an account if you haven’t already done so. After you created an account and verified it, create a Native Ad Unit inside your Admob App page.

Add the newly created Ad Unit Id and app id to the Tooleap Ads dashboard, and add the following dependencies to the build.gradle file:

 

Note: You can alternatively use Admob with firebase to display ads. In this case add the following dependencies to the build.gradle file:

consult the Admob Getting Started Guide on how to create you account.

 

 

The Easy-Peasy Way

To display a Bubble Ad whenever the user open an activity, simply add to your activity’s onResume the following lines:

Note: If you haven’t already done this, head to the Tooleap Ads dashboard to create an Ad Unit id.

 

For Those Who Like To Be In Control

You can load the Bubble Ad in advance, and then show it at the appropriate time. In this example we’ll load the ad inside the Activity’s onCreate, and then show it when someMethod is called:

Note: You can use any Context to initialize the ad, but you need an activity to show the ad once it’s loaded.

 

Get Notified When the User Interacts With the Ad

You can get callbacks when the user performs certain actions with the Bubble Ad by calling setAdActionsListener:

 

Dismiss the Bubble Ad

You can manually dismiss the Bubble Ad by calling dismissAd. Note that you need to call loadAd again before you can show another ad:

 

Change the badge on the Bubble Ad

By default when the Bubble Ad pops out it has a badge with the number “1”. You can also set the badge to show the word “Ad” or just use an empty badge as following:

Note: You can only change the badge type before the Bubble Ad is shown.

 

Change when the user can dismiss the Bubble Ad

By default the user can dismiss the Bubble Ad only after clicking on it and viewing the full ad at least once, You can allow the user to dismiss the bubble even before viewing the full ad:

Note: Changing this value to “true” might severely impact your ad revenues.

 

If you are using ProGuard, you should add the following lines to your ProGuard configuration file to exclude Tooleap from being obfuscated:

 

Download a sample app that shows the Bubble Ads in action using this link:

Tooleap Ads Demo App