B4A Library Leadbolt Ads

Discussion in 'Additional libraries, classes and official updates' started by ssg, Oct 14, 2011.

  1. aeropic

    aeropic Active Member Licensed User

    some explanations here :
  2. GMan

    GMan Well-Known Member Licensed User

  3. ilan

    ilan Expert Licensed User

  4. rafaelbr20

    rafaelbr20 Member Licensed 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

    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:


    End If
    End Sub

    Sub appfireworks_onmodulefailed()
    End Sub

    Sub LoadLeadbolt
    'Use this code elsewhere in your App to display a Leadbolt Ad
        ' ad.loadAdToCache() 'Un-comment and place appropriately to cache Ad
    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.

    (Line: 36) AppTracker.Initialize("4McSE7IWdZGJsmNPGPcQojOLZviCFr3M")
    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 !!!

  5. GMan

    GMan Well-Known Member Licensed User

    What libs from LeadBolt do you habe installed and which are checked in the IDE ?
    Does the sample work with your credentials ?
  6. rafaelbr20

    rafaelbr20 Member Licensed User

    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 !
  7. abhishek007p

    abhishek007p Active Member Licensed User

    bump for this thread.

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

    DavideV Active Member Licensed 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 :)
  9. FJS

    FJS Active Member Licensed User

    Good afternoon,

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

    Thank you in advance

    Best regards
  10. DavideV

    DavideV Active Member Licensed User

    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:


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

    Merry Christmas to all the B4X community ;)
  11. Cableguy

    Cableguy Expert Licensed User

    Hi guys...

    Any chance to catch the ad close event?
  12. FJS

    FJS Active Member Licensed 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:

    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: http://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
  13. FJS

    FJS Active Member Licensed 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: Jun 18, 2015
  14. Douglas Farias

    Douglas Farias Expert Licensed User

  15. DavideV

    DavideV Active Member Licensed 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 :)
    Erel likes this.
  16. Douglas Farias

    Douglas Farias Expert Licensed 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
  17. DavideV

    DavideV Active Member Licensed User

    Download from here:

    (if the download doesn't start retry later)

    The archive contains also the modified wrapper for B4A

  18. Douglas Farias

    Douglas Farias Expert Licensed User

  19. mlc

    mlc Active Member Licensed User


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

  20. DavideV

    DavideV Active Member Licensed User

    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.

    mlc likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice