First, a little plug for Amazon. I've had a lot of success in app development over the past 2 years, and over that time, Amazon has been my best source of monetization. I was fortunate to get in on the ground floor with their advertising when they first started in beta back at the end of 2012. I wanted to share an interstitial library that I developed to support these ads from Amazon. I have had a lot of interaction with the Amazon mobile ads team, and I can tell you that they are great to work with and they really listen to feedback.
Steps for implementation:
1) Set up a developer account with Amazon.
2) Add an app and make note of the App ID for use with the library. You don't have to publish it at this point to get the ID.
3) Download the SDK. Copy the amazon-ads jar file to your b4a libraries folder. Rename it to amazon-ads.jar.
4) Copy the library files attached to this post to your b4a libraries folder.
5) Implement the code in a similar manner as the attached example app.
6) Remember to add the following to your app manifest.
The only drawback to Amazon is a much lower fill rate than Admob. That said, it's worth it. I handle this by preloading interstitials from Amazon and Mopub. When it's time to show an ad, I check if the Amazon interstitial is loaded. If it is, I show that. If it's not, I check to see if the mopub ad is loaded. If it is, then I show that one. You could do this with Admob, or any other interstitial provider.
If you want to use Amazon for banner ads, canalrun has already written a library for that. Again, I recommend trying Amazon first for banners, and if that fails, back fill with another network.
Updated 4/11/16 to support amazon-ads-5.7.1.1.
Steps for implementation:
1) Set up a developer account with Amazon.
2) Add an app and make note of the App ID for use with the library. You don't have to publish it at this point to get the ID.
3) Download the SDK. Copy the amazon-ads jar file to your b4a libraries folder. Rename it to amazon-ads.jar.
4) Copy the library files attached to this post to your b4a libraries folder.
5) Implement the code in a similar manner as the attached example app.
6) Remember to add the following to your app manifest.
B4X:
AddApplicationText(<activity android:name="com.amazon.device.ads.AdActivity" android:configChanges="keyboardHidden|orientation|screenSize"/> )
The only drawback to Amazon is a much lower fill rate than Admob. That said, it's worth it. I handle this by preloading interstitials from Amazon and Mopub. When it's time to show an ad, I check if the Amazon interstitial is loaded. If it is, I show that. If it's not, I check to see if the mopub ad is loaded. If it is, then I show that one. You could do this with Admob, or any other interstitial provider.
If you want to use Amazon for banner ads, canalrun has already written a library for that. Again, I recommend trying Amazon first for banners, and if that fails, back fill with another network.
Updated 4/11/16 to support amazon-ads-5.7.1.1.
Attachments
Last edited: