I have a very simple test script based on this thread:
https://forums.developer.amazon.com/forums/thread.jspa?threadID=5947&tstart=0 The full script:
http://pastebin.com/6CLkKVtZ [b]Steps[/b] 1. Create new empty Unity Project 2. Import AmazonMobileAds.unitypackage 3. Create a C# script named AmazonAdsTest.cs and paste the pastebin contents 4. Run the program [b]Expected[/b] 1. Press 'Init' button 2. Press 'CreateInterstitialAd' button - Debug output "INTERSTITIAL 1" 3. Press 'LoadInterstitialAd' button - Debug output "loadingStarted: true" 4. Press 'Play' button - Debug output "adShown: true" [b]Actual Results in Unity Editor[/b] 1. Press 'Init' button 2. Press 'CreateInterstitialAd' button - Debug output "FLOATING 0" [b]<- Problem[/b] 3. Press 'LoadInterstitialAd' button - Debug output "loadingStarted: false" [b]Actual Results After Build and Run on Android Device (Watching log using logcat)[/b] 1. Press 'Init' button 2. Press 'CreateInterstitialAd' button - Debug output "INTERSTITIAL 1" 3. Press 'LoadInterstitialAd' button - Debug output "loadingStarted: False" [b]<- Problem[/b] - Debug output: KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.List`1[com.amazon.mas.cpt.ads.IDelegator]].get_Item (System.String key) [0x00000] in :0 at com.amazon.mas.cpt.ads.AmazonMobileAdsImpl.FireEvent (System.String jsonMessage) [0x00000] in :0 at com.amazon.mas.cpt.ads.AmazonMobileAdsImpl+AmazonMobileAdsBase.UnityFireEvent (System.String jsonMessage) [0x00000] in :0 [b]Unity Version:[/b] 5.0.3f2 [b]Android OS:[/b] 4.4.2 (Samsung S3) [b]Amazon SDK Version:[/b] Downloaded today from
https://developer.amazon.com/public/resources/development-tools/sdk No Clearly marked version number on that page or the download. I thought that maybe there is some Amazon wrapper magic that happens. So I deployed an app to Amazon 'Live App Testing' and downloaded it as a tester after it was published, but still have the same problem. I've tried using my ApplicationKey as well instead of the testing one, same problem. What am I missing?
I tried out that script in the Editor and on my Android phone, I still get the same results. The Dictionary error can be ignored. Like you say, it is caused if you press the "Load Ads" button twice in a row without pressing "Create Ads" in between. But that isn't the main problem, the main problem is: 1. Run your script on an Android phone 2. Press the "Create Ads" button 3. Press the "Load Ads" button That is as far as it gets. The log will show that 'loadingStarted ' will be false. I also took a deeper look and can see that this SDK is not meant to be tested inside the Unity editor. AmazonMobileAdsUnityEditor directly inherits from AmazonMobileAdsDefault but doesn't override NativeCreateInterstitialAdJson. So in the Unity Editor when I requested an Interstitial Ad, it just returned an Ad object initialized with empty json so Ad.AdType defaults to FLOATING. Being able to test in the Unity Editor is a 'nice to have', but I can easily live without it if there is some way to make an Ad show up on the phone itself.
Hey protonzero, I just tested the source above and was able to successfully display ads on a Nexus 7. Are you using the manifest provided by the sample code in the Assets/Plugins/Android/ directory? (MobileAdsSampleAndroidManifest.xml) If not, please remove any existing AndroidManifest.xml files in that directory and try renaming MobileAdsSampleAndroidManifest to AndroidManifest.xml. There are two primary permissions required in using these samples that need to be added to your manifest: [code] [/code] I did notice some KeyNotFoundExceptions when loading the interstitial, but they are displaying as desired. I hope this helps!