Android Question Issue mediating AdColony through AdMob

Computersmith64

Well-Known Member
Licensed User
Longtime User
I stumbled across Erel's tutorial on mediating ad networks through AdMob (in an app that is already showing AdMob ads fine), so thought I'd give it a try with AdColony. Per the instructions, I got the AdColony SDK & also the adapter & copied them to my Additional Libraries folder, then added:
B4X:
#AdditionalJar: adcolony 'SDK jar
#AdditionalJar: adcolony-3.2.1.1.aar 'adapter jar
to my project attributes region.

I went through the steps to set up an AdColony account, add the app to it & also to set up mediation on AdMob. Everything appears to be set up OK & I can see that AdMob is sending requests to AdColony, however they aren't being filled.

So - I took a look at the unfiltered logs in my app & found:
Expecting libadcolony.so in libs folder but it was not found. Disabling AdColony until next launch.
This is where I'm not sure what to do next. The SDK has a bunch of platform specific folders in it (arm64-v8a, x86, etc...) & each of these has a libadcolony.so file in it (they are all different sizes, so not the same file) - so I just dumped those folders in my Additional Libraries folder to see if that would work, but I still get the same error in the unfiltered logs. I also tried copying one of the libadcolony.so files straight into my Additional Libraries folder, but that didn't work either.

How do I set this up so that those libadcolony.so files are referenced correctly?

Thanks - Colin.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I don't know whether it is related or not but you should remove these comments from the attributes (or maybe you only added them in this post).

The SDK has a bunch of platform specific folders in it (arm64-v8a, x86, etc...) & each of these has a libadcolony.so file in it (they are all different sizes, so not the same file)
Can you post a screenshot with the SDK files?
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
I don't know whether it is related or not but you should remove these comments from the attributes (or maybe you only added them in this post).


Can you post a screenshot with the SDK files?
Hi Erel,

I just added the comments in the post for clarity. I've attached a screenshot of the SDK contents. Each of those folders has a lbjs.so & libadcolony.so file in it...

- Colin.
sdk.png
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Hi Erel,

I just added the comments in the post for clarity. I've attached a screenshot of the SDK contents. Each of those folders has a lbjs.so & libadcolony.so file in it...

- Colin.
View attachment 60518
Oh - & I know that the screenshot is of a zip archive. I did extract the files when I put them in the Additional Libraries folder (in case anyone things I AM a complete idiot!). :p

- Colin.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Here's what it looks like in my Additional Libraries folder...

libs.png
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
1. Open adcolony.jar with 7Zip.
2. Create a folder named lib (not Lib)
3. Copy armeabi to this folder.

It should be \lib\armabi\*.so files
You are a dead-set genius! I seem to be getting AdColony test ads now (which is odd, because I have them set to "live" in the AdColony console), so there's definitely something happening there.

Thanks Erel.

- Colin.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
I noticed when I went to release a new version of this app that I got a warning that it would not be supported on as many devices (I guess due to the armeabi native support). Granted, it was only 6 less devices supported, but is that likely to become a bigger issue?

- Colin.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
To answer my own question: I copied the other native support folders into the jar & the app still compiled & ran fine. In fact, some AdColony related error messages that I had seen when I only had the armeabi support in there are now gone. I still got a warning when I released the update on Play Store, but it was only for 1 now-unsupported device (which seems strange if I have all the native support libs in there).

The only drawback is that the apk has gone from 3.4 MB with no AdColony support to 3.9 MB with only armeabi support to 7.1 MB with all the native support libs.

- Colin.
 
Upvote 0
Top