Android Question Leadbolt Ads

ashton293

Member
Licensed User
Longtime User
Firstly my antivirus software is indicating the tutorial on these ads is an extremely high virus risk. Is there a "clean" version of the tutorial available?

What I would like to have is a step by step guide / checklist to setting these Leadbolt ads up [I realize this may not be available - but you don't know without asking].

My specific issues are:

1] the Android Manifest file - when I include the permissions etc suggested by Leadbolt I now have an app that doesn't launch when I "Compile and Run".

Through testing it appears to be a problem in the "application" section, however, it is possible there may be other errors in the manifest file I have created. The full manifest file follows:

AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>
<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"/>
<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"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<application
<service android:name="com.tegcccewpmwoueyxkc.ReEngagementService"></service>
<service android:name="com.tegcccewpmwoueyxkc.AdBootReceiverService"></service>
<receiver android:name="com.tegcccewpmwoueyxkc.ReEngagement"/>
<receiver android:name="b4a.additionslvl1Free.BootReceiver">
</receiver>
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</application>)

SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

If someone can identify the problem in the Manifest file for me it would be greatly appreciated.

2] I am not receiving any test ads coming through from Leadbolt.

I am hoping the problem is in the Manifest file.

By reading the forum I note some people had difficulties with the libraries. I have marked what I think are the relevant libraries on the libs page in B4A. For your information, I have ticked "Core"; LeadboltB4A; Licensing; Phone; SQL; AND tegcccewpmwoueyxkc.


Within the specific modules that generates the ads I have:
a] Declared the variable naming the ads in Sub Globals as LeadboltB4A;
b] Initialized the ad using the number provided in Leadbolt for the relevant ad type;
c] Then in a "Timer" function asked the app to load the ad with the LoadAd() instruction.

Should I include any other activities?

3] Has anyone explored how to use Leadbolt's Floating Ads yet? [They are in the latest update.] Any tips?

4] Is anyone using AppFireworks with their Leadbolt Ads Is using AppFireworks worthwhile or does Google Analytics provide adequate information?

The instructions say to use Eclipse to undertake particular functions when setting up AppFireworks. Can this be done in B4A without needing to use Eclipse - if so how do I do it?


I have asked my Leadbolt account manager for assistance however as it is now a weekend I don't expect I will get a reply from him before next week.

If someone on the forum can assist me before then it would be appreciated.

Thank you so much for your assistance.

 

LeadBolt

Member
Licensed User
Longtime User
1) You cannot ask add <application> tag inside the AddManifestText() definition. Refer to the B4A documentation properly which mentions that the Receivers and Services need to be added in the AddApplicationText() definition.


Also the BootReceiver you have defined is incorrect

<receiver android:name="b4a.additionslvl1Free.BootReceiver">
</receiver>
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>


The IntentFilter has to be defined INSIDE the <receiver> tag like so:
<receiver android:name="b4a.additionslvl1Free.BootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>


So all in all they need to add another block of code to in their ManifestEditor, like so:


AddApplicationText(
<service android:name="com.tegcccewpmwoueyxkc.ReEngagementService"></service>
<service android:name="com.tegcccewpmwoueyxkc.AdBootReceiverService"></service>
<receiver android:name="com.tegcccewpmwoueyxkc.ReEngagement"/>
<receiver android:name="b4a.additionslvl1Free.BootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>)

2) should be fixed with #1

Let me know if this helps.
 
Upvote 0

ashton293

Member
Licensed User
Longtime User
Thank you very much Leadbolt.

I am now able to have the app launch without any problem.

However, the ads are not appearing as yet.

I have read in other threads that this is most likely due to the setup - so I am going through those steps again and if necessary will generate another JAR / XML File to see if that makes a difference.

If you have any other tips that may solve this problem it would be appreciated.

Thank you again.

[My original confusion appears to have partly been driven by the "printed instructions" that came from "Leadbolt.com" which do not reflect the Manifest Editor that is now in B4A. Those instructions focus on the Manifest file and not the editor.]
 
Upvote 0

ashton293

Member
Licensed User
Longtime User
Dear Leadbolt,

Unfortunately I am still unable to load the ads.

I am running this in "Test Mode" - ie I haven't clicked on "Set Active" in the Leadbolt site at this stage. So beside the app name the Leadbolt site shows "Test Mode" and then beside each ad the Leadbolt site shows "App in test mode".

To run the ads in each module in which I am placing advertising I use the following instructions:

In "Sub Globals" I declare the Ad name as follows:

Dim Ad1 As LeadboltB4A

Under "Activity Create", I initialize the Ad as follows:

Ad1.initialize("the code number I get from the Leadbolt site when I press the button "Get Code" beside each ad")

To obtain the ad under "Activity Create" or under "Timer_Tick" I have used the instruction:

Ad1.loadAd


I am using the manifest editor in the manner you have shown me in your response above.

When I obtained a new SDK code I saved both the JAR and XML file for LeadboltB4A and the SDK JAR and XML in the libraries folder in the program file that is creating the B4A app. When these are loaded to that folder then "LeadboltB4A" and the "sdkpackagename" appear automatically in the libs tab in the app I am creating. I have then ticked the LeadboltB4A and the sdkpackagename in the libs folder for the app.

Apart from these two libraries - the other libraries I have ticked are: Analytics[version 2.01]; Core [version 3.00]; Licensing [version 1.10]; Phone [version 2.20] and SQL [version 1.20].

The only files I have in the app folder in the "Object / libs /" folder are:

Analytics.jar
AppFireworks.jar
libGoogleAnalyticsV2.jar

I have tried to test using the debug [legacy] and debug [rapid] modes.

I have tried structuring these files in various ways but I am not having any success - but at least the program was working with the change to the Manifest file.

If you are able to provide me with any additional guidance it would be appreciated.

Thank you!

Leigh

PS I am trying to run tests using an android emulator [Android 4.3 under API level 18]
 
Last edited:
Upvote 0
Top