B4A Library AdColony Library

Original library: https://github.com/AdColony/AdColony-Android-SDK
Based on AdColony Library v4.6.5 (21 October 2021).
Banner, Interstitial and Rewarded Interstitial.


For Interstitial Ad and for Rewarded Interstitial Ad you need to add this in your manifest:
B4X:
AddApplicationText(<activity
            android:name="com.adcolony.sdk.AdColonyInterstitialActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:hardwareAccelerated="true" />
        <activity
            android:name="com.adcolony.sdk.AdColonyAdViewActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:hardwareAccelerated="true" />)


For GDPR, COPPA and CCPA please read: https://github.com/AdColony/AdColony-Android-SDK/wiki/Privacy-Laws

Download library zip file and extract archive to Additional Libraries folder.
 

Attachments

  • AdColonyExample.zip
    14.1 KB · Views: 391
  • AdColonyLib.zip
    466.5 KB · Views: 173
Last edited:

chris ash

Member
Licensed User
Longtime User
Hi matey just giving this a try.

Have you got anything or any advice for dealing with the that GDPR side of things?

Thanks
CAsh
 

chris ash

Member
Licensed User
Longtime User
Check this link.
I will add support for GDPR in next version, also in next version I will update library to newer version.
Ahhh nice one. Not being pushy but do you have any rough idea on time scale for the next version?

No rush of course and thanks for your time and efforts thus far.
CAsh
 

Pendrush

Well-Known Member
Licensed User
Longtime User
Did we manage to get anywhere with the GDPR side of this?
B4X:
InitializeBanner (EventName As String, AppID As String, ZoneID As String, GDPR As Boolean, GDPRConsent As String, COPPA As Boolean, COPPAConsent As String, CCPA As Boolean, CCPAConsent As String)

 

chris ash

Member
Licensed User
Longtime User

Apologies if that was there all along.

Updated the Library and the code and seems to work like a charrm

Thankyou
 

Douglas Farias

Expert
Licensed User
Longtime User
Hi @Pendrush.

First thanks for making the library.

Only one report:
If you start the banner and the interstitial in the same activity the banner always fails. (Banner_OnRequestNotFilled).

If you start only one there are no errors, but the two together cause problems for the banner.

thxx
 

Pendrush

Well-Known Member
Licensed User
Longtime User
First you need to try with real APP ID and ZONE ID.
If above don't work, try example attached to this post.
You need to initialize banner and delay initialize Interstitial ad for 20 sec.
 

Attachments

  • AdColonyBannerInter.zip
    13.3 KB · Views: 272
Last edited:

Almora

Active Member
Licensed User
Longtime User
hi

What should I do to return to a different activity after closing the ad?
Is there a feature like admob?

sample..
B4X:
Sub tm_AdClosed  'admob
    Activity.Finish
    StartActivity(xxx)
End Sub



How can I return to the main activity after the ad is shown
B4X:
Sub activity_KeyPress (KeyCode As Int) As Boolean 'Return True to consume the event
 
    If KeyCode = KeyCodes.KEYCODE_BACK   Then
        
        If AdColony.IsInitialized  Then
            AdColony.Show       
        Else
            Activity.Finish
            StartActivity(Main)
        End If

        Return True
    End If
    Return False
End Sub
 

Pendrush

Well-Known Member
Licensed User
Longtime User
If you talk about Interstitial ad, event AdColony_OnOpened will fire after Ad is closed.
You can test it in example app attached to first post.
 

Almora

Active Member
Licensed User
Longtime User
thanks..
B4X:
Sub AdColony_OnOpened
    Log("OnOpened")
    Activity.Finish
    StartActivity(Main)
End Sub
 

bollanog

Member
Hello, good afternoon, is the library up and running? Because it has not wanted to work for me, I put the real AdColony App UUID and Zone ID and nothing appears yet.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…