question

Jazer Marie avatar image
Jazer Marie asked

Amazon Ads Integration

I have integrated amazon ads using Corona Enterprise for android. I have only tried testing the app on s3 and no test image had appeared. I'm assuming that there must be a test image that must appear like inmobi. Is my test device a factor that is why I can't see any test images of ads?
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.

Matt15@Amazon avatar image
Matt15@Amazon answered
Hello, Are you trying to load an ad but you don't see any ads appearing? In that case, please enable logging in your app and then examine the logcat around the time when the ad attempts to load. Then paste the message in your forum post. You can learn about enabling logging here: https://developer.amazon.com/sdk/mobileads/testing-your-app.html#Debugging Matt
10 |5000

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

Jazer Marie avatar image
Jazer Marie answered
Hi, I have put the codes like this: try{ Log.e(TAG, "Beginning of Request for Amazon Ads"); AdTargetingOptions adOptions = new AdTargetingOptions(); adView.loadAd(adOptions); Log.e(TAG, "Done Requesting Ads from Amazon"); } catch(Exception e){ Log.e(TAG, "Failed requesting Ads: " + e.toString()); } and got a : java.lang.NullPointerException Do you know what could possibly be the reason?
10 |5000

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

Jazer Marie avatar image
Jazer Marie answered
Does it count that I do not reside in the US that's why I'm getting a nullpointerexception even if I'm just on test mode?
10 |5000

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

Matt15@Amazon avatar image
Matt15@Amazon answered
Hello Jazer Marie, Did you initialize adView before attempting to load an ad? If not, this would cause a Null Pointer Exception. See instructions for setting up an AdLayout here: https://developer.amazon.com/sdk/mobileads/quick-start.html#Step4 Matt
10 |5000

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