question

yoonjy avatar image
yoonjy asked

Amazon Ads for Unity

Hello Amazon, I am currently working on a Unity project in which I wanted to integrate ads in. I was referenced to this site ( https://github.com/majidkh/Unity3d-Amazon-Mobile-Ads-Plugin) via the amazon forums and also( http://forums.developer.amazon.com/forums/thread.jspa?messageID=9806♎). I am currently having a few issues and was inquiring if you have any tips for integrating this?
mobile ads
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Maj avatar image
Maj answered
Hello there, You need to download the Unity-Plugin.unitypackage from: https://github.com/majidkh/Unity3d-Amazon-Mobile-Ads-Plugin And import everything in your project, then click on the AdRotator gameobject and enter your amazon app key in there and test it out.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi, We do not have any official unity plugin for Ads.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

yoonjy avatar image
yoonjy answered
Thank you for response. But I already added the project( https://github.com/majidkh/Unity3d-Amazon-Mobile-Ads-Plugin) in my project and added my app key. jar, Androidmanifest, and so on, I put into my Plugin File. But It is no working. and there is error (typeTree.m_Children.front ().m_Type != SerializeTraits ::GetTypeString (NUL) Do you know what is this? And I wonder Is this project really working???@@ If yes, Could you let me know the step that how to add this project( https://github.com/majidkh/Unity3d-Amazon-Mobile-Ads-Plugin) to my project? Actually, I did
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Maj avatar image
Maj answered
I think you are using an old version of Unity, try to update your Unity and give it another try, it should work.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

yoonjy avatar image
yoonjy answered
Thank you for reply. I wonder, After download the project( https://github.com/majidkh/Unity3d-Amazon-Mobile-Ads-Plugin), Should I set something? (Except adding Application key) Or just turn on unity and then open this project?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Maj avatar image
Maj answered
Try to enable Test mode and then compile it, you should see test ads. Then you can test interstitials by clicking on the Request interstitials and then Show interstitials. Depending your current location, Amazon may not show you live ads.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

yoonjy avatar image
yoonjy answered
Thank you for your advice. I imported this project's Package. I wonder, #if UNITY_ANDROID && ! UNITY_EDITOR private AndroidJavaObject plugin; #endif #if UNITY_ANDROID && ! UNITY_EDITOR AndroidJavaClass jc = new AndroidJavaClass("com.twimler.plugins.AmazonAds"); plugin = jc.CallStatic ("getInstance"); #endif #if UNITY_ANDROID && ! UNITY_EDITOR plugin.Call ("init", AppKey , TestMode ); #endif I think these command is not working because I set wrong path. How to set the path?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Maj avatar image
Maj answered
Please send your log file when launching the test app so I can review it and let you know if I spot anything.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

yoonjy avatar image
yoonjy answered
Thank you, how to invoke these functions? // Invokes when a banner loads private void OnBannerLoaded ( string network ) { } // Invokes when a banner fails to loads private void OnBannerFailed ( string network ) { }
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Maj avatar image
Maj answered
Actually you don't have to call any of these methods as these are events and being invoked by Amazon SDK when there is an ad event. All you need to do is open up the Unity Project, Select the AdRotator game object and enter your application key, ensure test mode is selected and then deploy it on your Android device. Then click on Create banner button and you should see the banner, Then Refresh, Hide and Unhide buttons should work on this banner. For interstitials, click on Request interstitial button, and once you see the checkbox on top is select ( indicating an interstitial is loaded ) click on the Show interstitials and it should work. I have made some changes to the plugin today so I suggest you to download it again and give it a try. It works just fine at my end.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.