B4A Library Leadbolt Ads

rafaelbr20

Member
Licensed User
Longtime User
Hi Everyone,

I didn´t have success to put Leadbolt library on my app.

I´ve created a test app to make it work.

What i did :

1 -Download the SDK from Leadbolt website
2 - Copy the files AppFireworksB4A.jar,AppFireworksB4A.xml,LeadBoltB4A.jar,LeadBoltB4A.xml to B4A Libraries folder
3 - Create a reference on my project

My Code

B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Dim ad As LeadBoltB4A
    Dim AppTracker As AppFireworksB4A
End Sub

Sub Activity_Create(FirstTime As Boolean)
If FirstTime = True Then
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("1")

    ad.Initialize("MY_ID")
    'ad.loadAd()

    AppTracker.Initialize("MY_ID")
    AppTracker.startSession()
End If
End Sub

Sub appfireworks_onmodulefailed()
    LoadLeadbolt
End Sub

Sub LoadLeadbolt
    'Use this code elsewhere in your App to display a Leadbolt Ad
    'ad.Initialize("MY_ID")
    ' ad.loadAdToCache() 'Un-comment and place appropriately to cache Ad
    ad.loadAd()
End Sub

' Leadbolt ->
Sub ad_AdClicked

End Sub
Sub ad_AdClosed

End Sub
Sub ad_AdCompleted

End Sub
Sub ad_AdFailed

End Sub
Sub ad_AdLoaded

End Sub
Sub ad_AdCached

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

End Sub
Sub ad_AdProgress

End Sub
Sub ad_AdAlreadyCompleted

End Sub
Sub ad_AdPaused

End Sub
Sub ad_AdResumed

End Sub
'Event Listeners for Audio Ads
Sub ad_AudioAdProgress

End Sub
Sub ad_AudioAdClicked

End Sub
Sub ad_AudioAdClosed

End Sub
Sub ad_AudioAdFinished

End Sub
Sub ad_AudioAdFailed

End Sub
Sub ad_AudioAdLoaded

End Sub
Sub ad_AudioAdCached

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

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


1º Problem - If i try to load the ads right after initialize, occurs the error.

B4X:
(Line: 36) AppTracker.Initialize("4McSE7IWdZGJsmNPGPcQojOLZviCFr3M")
java.lang.NullPointerException

To Workaround i created the Sub "LoadLeadbolt" and called it from RESUME sub.

The erro does not occurs, but the ads did not appears

Thanks for any help !!!

Rafael
 

GMan

Well-Known Member
Licensed User
Longtime User
What libs from LeadBolt do you habe installed and which are checked in the IDE ?
Does the sample work with your credentials ?
 

rafaelbr20

Member
Licensed User
Longtime User
What libs from LeadBolt do you habe installed and which are checked in the IDE ?
Does the sample work with your credentials ?

Hi GMan !! Thanks for your Help.

I Got it ! The problem was because i forgot to check the right libraries at B4A !

Thanks so Much !
 

abhishek007p

Active Member
Licensed User
Longtime User
bump for this thread.

Can someone tell me what is the latest version for this library?
 

DavideV

Active Member
Licensed User
Longtime User
Hi, if you are registered to their site then you can dowload their latest SDK (V6.5) bundled with the B4A wrapper and istructions
Hope this help
 

DavideV

Active Member
Licensed User
Longtime User
Good afternoon,

Pleade, could anyone tell me how to close one especific ads with the new library??


Thank you in advance

Best regards

Hi FJS,
latest Leadbolt lib is V6.5, consider to upgrade to this version, you can download the package personalized for you that contains the B4A Wrapper.
Once you are up and running this new sdk you can remove ads by adding this line:

YourAdsName.DestroyAd

In the package there is a txt file with some examples...

Merry Christmas to all the B4X community
DavideV
 

Cableguy

Expert
Licensed User
Longtime User
Hi guys...

Any chance to catch the ad close event?
 

FJS

Active Member
Licensed User
Longtime User
Hi everybody,

I used leadbolt from 2years, and now there are some changes on their webside, so I have several questions:

1. Which is the lastest version of sdk?. On the webside you can see some information:
http://help.leadbolt.com/using-b4a-android/

but if you push in order to download, the zip only contine AppTracker.jar, AppTracker.xml, AppTrackerB4A.jar and AppTrackerB4A.xml files,
but where is the last version of pubiapp.jar, pubxappCom.jar, LeadboltIWrapper.jar and LeadboltXWrapper.jar ??

As pluton said: https://www.b4x.com/android/forum/threads/leadbolt-ads.12002/page-14

2. Regarding the banner ads, how can I show them in my app?.

3. Please, is it possible than anybody explain how work the different way to use the leadbolt ads? any leadbolt responsable here?

Thank you very much for your help and answers
 

FJS

Active Member
Licensed User
Longtime User
hello everybody,

A few weeks ago, the sdk and the posible kinds of ads have changed for Leadbolt (for B4A). Please, anybody could help to the comunity in order to update this library and the steps to used?, Is there anybody expert in this library?

Thank you very much for all your help

I hope the answer will be useful for many members of this comunity


PS: now this library gives a false positive with avast, anybody know why??, or how to solve it?
 
Last edited:

Douglas Farias

Expert
Licensed User
Longtime User

DavideV

Active Member
Licensed User
Longtime User
Hi Douglas,
in my little experience i can say support is good and the sdk is up to date.
Profits depends on how many views your app generates (of course) . If your app generates a sufficent number of views you can access special programs and earn more (not for me).

The sdk wrapper has a little bug and can cause your app to crash, i modified it and it works fine.
Maybe you need to be registered to download the SDK ? i downloaded it as i'm registered with them.

I wish you and all the community here a Happy new Year
 

Douglas Farias

Expert
Licensed User
Longtime User
ok, this is good.
can you download the file for me and upload here pls?
i m loged in, but still access denid, already tryed another browser and not works.

and about the crash, what exactly need change to avoid the crash? what u made to modified this?

thx again
 

DavideV

Active Member
Licensed User
Longtime User

mlc

Active Member
Licensed User
Longtime User
Hello,

To show leadbolt ads, is it necessary, that the app should be published in google.play?

Thanks
 

DavideV

Active Member
Licensed User
Longtime User
Hello,

To show leadbolt ads, is it necessary, that the app should be published in google.play?

Thanks
They want a link to download your app and see the ads implementation but not sure if it has to be an official store...
Better to ask them if you are registered.

Bye
 
Reactions: mlc
Cookies are required to use this site. You must accept them to continue using the site. Learn more…