B4A Library Leadbolt Ads

Hi all,

(Long post warning!)

I am going to release a new library for leadbolt.

Please use following link to register (it will help me get some referral bonusses, and it will cost you absolutely nothing):

LeadBolt Mobile Ad network- Advertise and Monetize traffic on Android and iPhones

If you thought admob was bad, and airpush was a fresh breath of air, wait till you try leadbolt!

Lets just say what I can get from leadbolt is at WORST twice what I get from admob, and at BEST so far is 6 times what I get from admob. <-- on a daily basis! (was very very close to hitting $100 in one of my days on leadbolt alone)

I am doing some fine tuning on the library and should release it within the next 24 hours.

So please show some support and love for humanity, and sign up with the link above... hehe.. you will really like the revenue generated.

LeadBolt Mobile Ad network- Advertise and Monetize traffic on Android and iPhones

To test the ads out, download one of my games, BallTapp:

https://market.android.com/details?id=com.madelephantstudios.BallTapp&feature=search_result

It has admob, airpush and leadbolt in it.

On their site, they have a library for B4A built by them, that library adds the web type ads, something like what Millenial Media has. I have tried those and the returns are no fun at all.

Their push notifications are excellent, plus they arent as hated as airpush for some reason... overpublicity by airpush perhaps? LOL!

Do register your accounts with leadbolt and set up your ads for Notification (SDK) type.

Another good point about them is you will be assigned an accounts manager, who reply your mails and is contactable via IM. (unlike the unknown that is admob/google)

Questions or feedback welcome.

PS - Feedback is really appreciated as the other ad libraries I've released have had no responses if they work fine or not for others. :(

:sign0089:
 

ssg

Well-Known Member
Licensed User
Longtime User
Just wrote this one for testing, replace with your own section id:

B4X:
Sub Globals

   Dim wv As WebView
   
End Sub

Sub Activity_Create(FirstTime As Boolean)
   wv.Initialize("wv")
   Activity.AddView(wv, 0, 0, 100%x, 50dip)
   wv.JavaScriptEnabled = True
   wv.LoadHtml("<body marginwidth='0' marginheight='0' leftmargin='0' topmargin='0'> <script Type='text/javascript' src='http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxx'></script>")

End Sub

Sub wv_OverrideUrl (Url As String) As Boolean
   Dim i As Intent
    i.Initialize(i.ACTION_VIEW, Url)
    StartActivity(i)
   wv.LoadHtml("<body marginwidth='0' marginheight='0' leftmargin='0' topmargin='0'> <script Type='text/javascript' src='http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxx'></script>")
    Return True
End Sub

It works fine on my device, with a neat little trick of loading a new ad once the user clicks on the current one :D

Give that a try.
 

Stulish

Active Member
Licensed User
Longtime User
Still no change,

I will give it a better look at tomorrow

Thanks

Stu
 

Monkeh

Member
Licensed User
Longtime User
Just wrote this one for testing, replace with your own section id:

B4X:
Sub Globals

   Dim wv As WebView
   
End Sub

Sub Activity_Create(FirstTime As Boolean)
   wv.Initialize("wv")
   Activity.AddView(wv, 0, 0, 100%x, 50dip)
   wv.JavaScriptEnabled = True
   wv.LoadHtml("<body marginwidth='0' marginheight='0' leftmargin='0' topmargin='0'> <script Type='text/javascript' src='http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxx'></script>")

End Sub

Sub wv_OverrideUrl (Url As String) As Boolean
   Dim i As Intent
    i.Initialize(i.ACTION_VIEW, Url)
    StartActivity(i)
   wv.LoadHtml("<body marginwidth='0' marginheight='0' leftmargin='0' topmargin='0'> <script Type='text/javascript' src='http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxx'></script>")
    Return True
End Sub

It works fine on my device, with a neat little trick of loading a new ad once the user clicks on the current one :D

Give that a try.

This seems to work OK (so far) for me. Will update if I encounter any problems. Thanks!
 

jalle007

Active Member
Licensed User
Longtime User
here is the code:
iLeadbolt.Initialize("LeadboltI")
iLeadbolt.setListener()
iLeadbolt.loadLeadboltAds("xxxxxxx",iLeadbolt.ADS_DISPLAY)

xLeadbolt.Initialize("LeadboltX")
xLeadbolt.setListener()
xLeadbolt.loadLeadboltAds("xxxxxxx", xLeadbolt.ADS_NOTIFICATION)
and this is the error
xLeadbolt.loadLeadboltAds("330888281", xLeadbolt.ADS_NOTIFICATION)
java.lang.NoSuchMethodError: com.pad.android.util.AdOptinRequest.<init>
is it true that leadbolt doesnt work on lower API's (7,8,...) ???

I would appreciate your help :sign0104:
 
Last edited:

geewiztech

Member
Licensed User
Longtime User
Can you give me an example of what to put in the manifest editor (I don't want to write directly to the manifest)
 

enrico

Active Member
Licensed User
Longtime User
Just wrote this one for testing, replace with your own section id:

B4X:
Sub Globals

   Dim wv As WebView
  
End Sub

Sub Activity_Create(FirstTime As Boolean)
   wv.Initialize("wv")
   Activity.AddView(wv, 0, 0, 100%x, 50dip)
   wv.JavaScriptEnabled = True
   wv.LoadHtml("<body marginwidth='0' marginheight='0' leftmargin='0' topmargin='0'> <script Type='text/javascript' src='http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxx'></script>")

End Sub

Sub wv_OverrideUrl (Url As String) As Boolean
   Dim i As Intent
    i.Initialize(i.ACTION_VIEW, Url)
    StartActivity(i)
   wv.LoadHtml("<body marginwidth='0' marginheight='0' leftmargin='0' topmargin='0'> <script Type='text/javascript' src='http://ad.leadboltads.net/show_app_ad.js?section_id=xxxxxxxx'></script>")
    Return True
End Sub

It works fine on my device, with a neat little trick of loading a new ad once the user clicks on the current one :D

Give that a try.

It works but opens the Webview in the same banner window.
Is it possible to open in full size in a new window ?
 

GMan

Well-Known Member
Licensed User
Longtime User
So, got it to work (i think).
Will be back with some more results (App still in Approvement)
 
Last edited:

GMan

Well-Known Member
Licensed User
Longtime User
Roger :D
All works fine - it took some time to get all all improvements and possibilities are "saved to BrainDisk" :oops:
An all in one TUTs for all those Libs are appreciated :rolleyes:
 

aeropic

Active Member
Licensed User
Longtime User
Hi,

I just try to add some leadbolt ad in my apps... Up to now without success !
What I did;
- created an account on leadbolt
- generated an app banner ad and coolected the "serial number"
- generated a SDK for B4A
- installed all files (pmfogauiuitu.xml & jar + LeadBoltB4A.xml & jar) into the libs directory
- added those libs to the application
- added
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
in the manifest
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="4" />
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.INTERNET"/>)
and coded this (based on circleseek example)
B4X:
Sub Globals
    Dim vbar As VSeekbar
    Dim Hbar As HSeekbar
    Dim cs, cs2 As CircleSeek
   
    Dim ad As LeadBoltB4A
End Sub

Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("bar.bal")
Hbar.setColors(Colors.Black, Colors.white, Colors.rgb(255,180,180), Colors.white)
vbar.setColors(Colors.Black, Colors.yellow, Colors.rgb(150,150,255), Colors.white)
'Size.SetSize(Activity,480,320)

              '  Code creation
cs2.Initialize(Me,"cs2")
cs2.CodeCreateView(31%x,31%x,100, cs2.SHORT_KNOB)
Activity.AddView(cs2.AsView,20%x,60%y,40%x,40%x)
                ' set the colors and text size
cs.setColors(Colors.RGB(150,150,255), Colors.blue, Colors.RGB(180,180,255), Colors.Yellow, 12*Size.cf)
'cs2.setColors(Colors.RGB(150,150,255), Colors.blue, Colors.RGB(180,180,255), Colors.Yellow, 24*Size.cf)
' cs2 will have the default colors


'for all ad types
    ad.Initialize("540410629")

    'To run LeadBolt Display Ad
    ad.loadAd()
End Sub

it compiles fine, runs well but no ad is shown neither on the AVD nor on the phone.

Am I missing something to allow the ad to be displayed ? Adding a view somewhere ?
 

GMan

Well-Known Member
Licensed User
Longtime User
Is the App still in Approval Mode or Test Mode ?
If first, you have to wait until its approved, if second you have to set it to Active Mode.

When not approved yet, you can start a test with that section id.

Normally it leasts only some minutes (after placing the section id ifrom an approved app) until the Ads from leadbolt are displayed

Initializing is enough, when you call ad.LoadAd all other is done automatically

Did you insert the Subs for LeadBolt ?

B4X:
' Leadbolt ->
Sub Leadbolt_AdClicked

End Sub
Sub Leadbolt_AdClosed

End Sub
Sub Leadbolt_AdCompleted

End Sub
Sub Leadbolt_AdFailed

End Sub
Sub Leadbolt_AdLoaded

End Sub
Sub Leadbolt_AdCached

    'If ad.loadAdToCache() used, add the following line here -> ad.loadAd()

End Sub
Sub Leadbolt_AdProgress

End Sub
Sub Leadbolt_AdAlreadyCompleted

End Sub
Sub Leadbolt_AdPaused

End Sub
Sub Leadbolt_AdResumed

End Sub
'Event Listeners for Audio Ads
Sub Leadbolt_AudioAdProgress

End Sub
Sub Leadbolt_AudioAdClicked

End Sub
Sub Leadbolt_AudioAdClosed

End Sub
Sub Leadbolt_AudioAdFinished

End Sub
Sub Leadbolt_AudioAdFailed

End Sub
Sub Leadbolt_AudioAdLoaded

End Sub
Sub Leadbolt_AudioAdCached

    'If ad.loadAudioAdToCache() used, add the following line here -> ad.loadAudioAd()

End Sub
' Leadbolt <-
 
Last edited:

GMan

Well-Known Member
Licensed User
Longtime User
App is in test mode and this is why I tested it in the emulator. It should work shouldn't it ?
Yo ;-) But i never tested in on the Emulator, on a real device the test mode works
I did not insert any sub from LeadBolt... Could it be the reason ?
Maybe - they are all empty, but...paste them, didn't take much space :cool:
 

aeropic

Active Member
Licensed User
Longtime User

I had a look...thank for the advice.
I did not even add the full internet access because the admob banner I have too in that application does the job, but you're right all extra authorization have been added automatically by leadbolt librairy in the manifest.
==> I wonder if Leadbolt is the right choice !
 
Last edited:

GMan

Well-Known Member
Licensed User
Longtime User
You have to create it for your personal use...Download SDK -> then it is generated online specially for you - then you can downoad it
 
Top