Question

I am trying to integrate Leadbolt icon ads into an Android app. I followed the How-to guide: http://www.leadbolt.com/docs/Leadbolt_android_app_guide_v304.pdf . Here's the relevant code:

<uses-permission android:name="android.permission.SET_WALLPAPER" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

<!-- LeadBolt -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>

The onCreate for the launcher Activity:

String leadboltIconId = Application.getInstance().getLeadboltIconId();
Log.d(TAG, "leadboltIconId: >" + leadboltIconId + "<");
AdController adController = new AdController(this, leadboltIconId, this);
adController.loadIcon();

"leadboltIconId" is filled correctly. Here is a ss of the config screen:

enter image description here

and the details screen: enter image description here

I am using an emulator with 2.3.3 on it. It also doesn't work on my HTC Incredible with CM7 ( 2.3.3 ). There are no errors in the log. The activity implements AdListener and none of the methods are ever called.

Was it helpful?

Solution

Please change this line:

AdController adController = new AdController(this, leadboltIconId, this);

to

AdController adController = new AdController(
    getApplicationContext(), leadboltIconId);

Also, please note the 3 variable is not needed when running App Icons as App icons will not trigger any event listeners. You need to use the Application Context rather than Activity for App Icons and Notifications. Activity is needed for App Ads.

OTHER TIPS

I've got the same problem with the Ad Icon. I also noticed someone else posting this problem on the Leadbolt Q&A forum recently. There might be a problem with Leadbolt's side, however they fail to communicate this to us...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top