Failed to integrate AdColony mediation in Unity 5

789 views
Skip to first unread message

Andy Lee

unread,
Mar 4, 2016, 11:25:40 AM3/4/16
to Google Mobile Ads SDK Developers
Hi all,

I have been trying to integrate AdColony mediation in Unity, but unfortunately, I couldn't make it to work.

I have integrated the Google Mobile Ads SDK into Unity according to the developer guide and it could run successfully. But when I was integrating the mediation networks, I couldn't apply the iOS/Android guides into Unity.

I'm using Unity 5.3.2p3 and have integrated Google Mobile Ads SDK 3.0.1. AdColony was the first ad network I tried to integrate. So I followed the "Unity Setup" section of this AdColony Adapter Integration Guide for Android. I added AdColony as an ad source for my ad units. I imported the AdColony Unity SDK 2.1.2 and also replaced adcolony.jar by the one from adaptor library. I called 
AdColony.Configure("version:1.0,store:google", "appcbXXXXXXXXXXXXXXXXX", "vzfaXXXXXXXXXXXXXXXX");
 in Start() before any ad is loaded. That's what I could do and also what I did by following the guide. But it shows no sign of working.

I saw this warning log after the app was started which I think is related to this problem:
03-04 17:41:50.640: W/Ads(18872): Fail to instantiate adapter GADMAdapterAdColony
03-04 17:41:50.640: W/Ads(18872): android.os.RemoteException
03-04 17:41:50.640: W/Ads(18872): at com.google.android.gms.internal.zzew.zzai(Unknown Source)
03-04 17:41:50.640: W/Ads(18872): at com.google.android.gms.internal.zzew.zzah(Unknown Source)
03-04 17:41:50.640: W/Ads(18872): at com.google.android.gms.internal.zzew.zzaf(Unknown Source)
03-04 17:41:50.640: W/Ads(18872): at com.google.android.gms.internal.zzex$zza.onTransact(Unknown Source)
03-04 17:41:50.640: W/Ads(18872): at android.os.Binder.transact(Binder.java:380)
03-04 17:41:50.640: W/Ads(18872): at com.google.android.gms.ads.internal.l.a.d.a(SourceFile:94)
03-04 17:41:50.640: W/Ads(18872): at com.google.android.gms.ads.internal.reward.c.b(SourceFile:194)
03-04 17:41:50.640: W/Ads(18872): at com.google.android.gms.ads.internal.reward.mediation.h.a(SourceFile:53)
03-04 17:41:50.640: W/Ads(18872): at com.google.android.gms.ads.internal.util.b.run(SourceFile:19)
03-04 17:41:50.640: W/Ads(18872): at com.google.android.gms.ads.internal.util.r.call(SourceFile:52)
03-04 17:41:50.640: W/Ads(18872): at com.google.android.gms.ads.internal.util.s.run(SourceFile:75)
03-04 17:41:50.640: W/Ads(18872): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
03-04 17:41:50.640: W/Ads(18872): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
03-04 17:41:50.640: W/Ads(18872): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
03-04 17:41:50.640: W/Ads(18872): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
03-04 17:41:50.640: W/Ads(18872): at java.lang.Thread.run(Thread.java:818)

Did I miss anything? I saw that in the "Interstitials", addNetworkExtrasBundle(AdColonyAdaptor.class, AdColonyBundleBuilder.build()) is called, but it is not available in Unity. Should I expect that it is done automatically by the adaptor? I would be pleased you could help me to figuring this out and make mediation works in Unity.

Best regards,
Andy Lee

Veer Arjun Busani

unread,
Mar 4, 2016, 3:51:14 PM3/4/16
to Google Mobile Ads SDK Developers
Hi Andy,

I would suggest you to make a new build just to test out the integration. Download both the Mobile Ads Unity plugin and the AdColony Unity Plugin. Import them and make sure you have Google Play Services library in your Android SDK. Now once you have the Ad Unit ID properly set and AdColony configuration done, you must be good to go. You do not need to put in any Extras while making the AdRequest. What the log tells me is that the SDK failed to load the AdColony Adaptor, so there must be something wrong with the implementation. 

In case of Android:
Just make sure that your AdColony adaptor and SDK goes into Assets/Plugin/Android folder

In case of iOS: 
Once Unity makes an iOS build, open it in Xcode and copy over the required adapter and SDKs like you normally would.

If you still are facing issues, you could reply me back privately with your Ad Unit ID for us to test further.

Thanks,
Veer Arjun Busani
Mobile Ads SDK Team

Andy Lee

unread,
Mar 6, 2016, 8:36:22 PM3/6/16
to Google Mobile Ads SDK Developers
Thanks for the reply, sorry I couldn't reply from my mobile. I will try to make a new build and get back to you.

Andy Lee

unread,
Mar 9, 2016, 5:03:18 AM3/9/16
to Google Mobile Ads SDK Developers
Hi Veer,

Thanks for help! After creating a new project and testing again, it works fine. The AdColony ads can be shown. And it now also works in the actual project.
About the warning log, I wonder it is really related to this problem. It still exists but the ads work fine now. I will investigate on it.

Best regards,
Andy.

Thang Doan

unread,
Aug 1, 2016, 7:03:00 AM8/1/16
to Google Mobile Ads SDK Developers

Hi, I have the same problem like Andy Lee (my project coded by Android Studio) . On debug mode it is OK, but when i change to release mode, it show error with any ad network. I do every thing follow https://firebase.google.com/docs/admob/android/mediation, it stilled happen. Now i see you wrote:
"In case of Android:
Just make sure that your AdColony adaptor and SDK goes into Assets/Plugin/Android folder"
did it work for pre version or this version, and why Google don't write in the Doc
Thanks!

Veer Arjun Busani(Mobile Ads SDK Team)

unread,
Aug 1, 2016, 11:02:49 AM8/1/16
to Google Mobile Ads SDK Developers
Hi Thang,

This is for Unity and not for native Android. In case of native Android development, you can copy the AdColony's adaptor JAR file into Project > app > libs folder or import it as a Module. You can use this sample app to learn how this is done.

Thanks,
Veer Busani
Mobile Ads SDK Team

Thang Doan

unread,
Aug 1, 2016, 12:53:29 PM8/1/16
to google-adm...@googlegroups.com

No, i had added all adapters and sdks to assets... folder and it is ok. But if not it re-show error :(, of courses i had put those files to libs folder. I dont know why? :D

--

---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/5SH_MUygjKI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thang Doan

unread,
Aug 1, 2016, 1:01:06 PM8/1/16
to google-adm...@googlegroups.com

Like before post, if those file only located in libs=> ok in "debug mode", but in "release mode", it isnt success :D. Did you try in "release mode"

On Aug 1, 2016 22:02, "'Veer Arjun Busani(Mobile Ads SDK Team)' via Google Mobile Ads SDK Developers" <google-adm...@googlegroups.com> wrote:

--

Veer Arjun Busani(Mobile Ads SDK Team)

unread,
Aug 1, 2016, 5:04:11 PM8/1/16
to Google Mobile Ads SDK Developers
Hi Thang,

Can you send us your Ad Unit ID for us to look into? Also, do attach your logs with your APK as well. I'm able to receive ads even in Release mode. 

Thanks,
Veer Busani
Mobile Ads SDK Team

On Monday, August 1, 2016 at 1:01:06 PM UTC-4, Thang Doan wrote:

Like before post, if those file only located in libs=> ok in "debug mode", but in "release mode", it isnt success :D. Did you try in "release mode"

To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Thang Doan

unread,
Aug 1, 2016, 5:10:42 PM8/1/16
to google-adm...@googlegroups.com

Thankyou, i think it is ok after i changed google service gms to firebase (i change it in same time i put those file) now i removed those file from asset, then my mediation still ok 😆


On Aug 2, 2016 04:04, "'Veer Arjun Busani(Mobile Ads SDK Team)' via Google Mobile Ads SDK Developers" <google-adm...@googlegroups.com> wrote:
>
> Hi Thang,
>
> Can you send us your Ad Unit ID for us to look into? Also, do attach your logs with your APK as well. I'm able to receive ads even in Release mode. 
>
> Thanks,
> Veer Busani
> Mobile Ads SDK Team
>
> On Monday, August 1, 2016 at 1:01:06 PM UTC-4, Thang Doan wrote:
>>
>> Like before post, if those file only located in libs=> ok in "debug mode", but in "release mode", it isnt success :D. Did you try in "release mode"
>>

>>> To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
>>> To post to this group, send email to google-adm...@googlegroups.com.


>>> For more options, visit https://groups.google.com/d/optout.
>

> --
>
> ---
> You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/5SH_MUygjKI/unsubscribe.

> To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
> To post to this group, send email to google-adm...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages