Feb 23, 2014 Replies: 33 Just after I released this wrapper, Amazon changed their SDK function prototypes for the listeners. That change broke the wrapper. See post #20 in this thread for a modified version of the wrapper. Hello, I have attached a zip archive with a wrapper library for the Amazon Ads SDK. The zip archive includes the wrapper source code in Java, the compiled library jar and XML files, and a small test B4A application. I based the wrapper on source code uploaded by Erel several years ago for the Admob wrapper merged with the Amazon SimpleExample. I used the Simple Library Compiler (SLC) to compile. You will need to get an Amazon developer account, it's free, and an app ID. I just created a dummy test app entry to get the ID. https://developer.amazon.com/public/ You also need to download the Amazon Ad SDK. I renamed it to amazon-ads.jar by removing the version number from the jar file name. https://developer.amazon.com/public/resources/development-tools/sdk The Amazon-ads.jar is buried in the SDK download. You have to open the SDK archive and extract amazon-ads-xxxx.jar library. This jar (amazon-ads.jar) along with my AmznAd.jar and AmznAd.xml files from the attached zip archive should be placed in your B4A Additional Libraries directory. Your Amazon App ID needs to be entered in the B4A file. I have tested this wrapper for two Amazon ad sizes, 320x50 and 300x250. When you look at the wrapper Java source code and find major errors, please upload the fixes to this forum. Barry. Attachments AmznAdTest.zip AmznAdTest.zip 12.8 KB · Views: 675 Last edited: May 23, 2014 Click to expand...
Just after I released this wrapper, Amazon changed their SDK function prototypes for the listeners. That change broke the wrapper. See post #20 in this thread for a modified version of the wrapper. Hello, I have attached a zip archive with a wrapper library for the Amazon Ads SDK. The zip archive includes the wrapper source code in Java, the compiled library jar and XML files, and a small test B4A application. I based the wrapper on source code uploaded by Erel several years ago for the Admob wrapper merged with the Amazon SimpleExample. I used the Simple Library Compiler (SLC) to compile. You will need to get an Amazon developer account, it's free, and an app ID. I just created a dummy test app entry to get the ID. https://developer.amazon.com/public/ You also need to download the Amazon Ad SDK. I renamed it to amazon-ads.jar by removing the version number from the jar file name. https://developer.amazon.com/public/resources/development-tools/sdk The Amazon-ads.jar is buried in the SDK download. You have to open the SDK archive and extract amazon-ads-xxxx.jar library. This jar (amazon-ads.jar) along with my AmznAd.jar and AmznAd.xml files from the attached zip archive should be placed in your B4A Additional Libraries directory. Your Amazon App ID needs to be entered in the B4A file. I have tested this wrapper for two Amazon ad sizes, 320x50 and 300x250. When you look at the wrapper Java source code and find major errors, please upload the fixes to this forum. Barry.
GMan Well-Known Member Licensed User Longtime User May 23, 2014 #21 Now it throughs an error: class file com.amazon.device.ads.AdLayout not found her: B4X: Expand Collapse Copy pnlAd.AddView(advw, 0, 0, pnlAd.Width, pnlAd.Height) If i comment that out i got an error A referenced libary is missing: amazon-Ads But its still there
Now it throughs an error: class file com.amazon.device.ads.AdLayout not found her: B4X: Expand Collapse Copy pnlAd.AddView(advw, 0, 0, pnlAd.Width, pnlAd.Height) If i comment that out i got an error A referenced libary is missing: amazon-Ads But its still there
canalrun Well-Known Member Licensed User Longtime User May 23, 2014 #22 It appears that you are trying my AMZNAdTest.b4a example – I recognize that line of code. My guess would be that it is not finding the amazon-ads.jar library. This library is part of the Amazon SDK for android which is available at: https://developer.amazon.com/public/resources/development-tools/sdk I am in the USA. I hope this location is valid for Germany. Download the SDK, Apps-SDK.zip. Open the zip file, buried deep within the zip file, Android\Ads\lib\, you'll find the amazon ads jar file. The most recent version appears to be amazon-ads-5.3.22.jar. Extract this jar file. Rename it to amazon-ads.jar (this is supposed to make my wrapper version independent) (the name may need to be all lowercase, not sure), then copy amazon-ads.jar to your B4A additional libraries folder. This library is referenced by my wrapper. You also need to copy the two wrapper files, AmznAd2.jar and AmznAd2.xml. It appears you have already done this. I hope this solves the problem. Barry.
It appears that you are trying my AMZNAdTest.b4a example – I recognize that line of code. My guess would be that it is not finding the amazon-ads.jar library. This library is part of the Amazon SDK for android which is available at: https://developer.amazon.com/public/resources/development-tools/sdk I am in the USA. I hope this location is valid for Germany. Download the SDK, Apps-SDK.zip. Open the zip file, buried deep within the zip file, Android\Ads\lib\, you'll find the amazon ads jar file. The most recent version appears to be amazon-ads-5.3.22.jar. Extract this jar file. Rename it to amazon-ads.jar (this is supposed to make my wrapper version independent) (the name may need to be all lowercase, not sure), then copy amazon-ads.jar to your B4A additional libraries folder. This library is referenced by my wrapper. You also need to copy the two wrapper files, AmznAd2.jar and AmznAd2.xml. It appears you have already done this. I hope this solves the problem. Barry.
GMan Well-Known Member Licensed User Longtime User May 23, 2014 #23 I did that all, already, also newest jar etc. Renamed, copied etc....
canalrun Well-Known Member Licensed User Longtime User May 23, 2014 #24 Hello, I'm afraid I'm stumped here. I did a clean install of B4A 3.80 on a backup computer, copied the two wrapper library files into a new "Adlibs" directory within B4A, downloaded the SDK, extracted, renamed, and copied the amazon ads.jar into my Adlibs directory. I then extracted and compiled my test B4A program using 3.80, installed via the bridge. It ran properly. The B4A installation was brand-new. My Adlibs directory contains only the two wrapper files and the amazon-ads.jar file. My next suspicion would be for a conflicting library. Is this possible? I saw a different Amazon ad library on the forums. Is it possible you installed this and it may be conflicting somehow? I am in the USA and I believe you are in Germany? There is always the possibility that there is a difference between the underlying libraries we use – I have run into this problem in the past. I am a little suspicious of the things Amazon sometimes does. Barry.
Hello, I'm afraid I'm stumped here. I did a clean install of B4A 3.80 on a backup computer, copied the two wrapper library files into a new "Adlibs" directory within B4A, downloaded the SDK, extracted, renamed, and copied the amazon ads.jar into my Adlibs directory. I then extracted and compiled my test B4A program using 3.80, installed via the bridge. It ran properly. The B4A installation was brand-new. My Adlibs directory contains only the two wrapper files and the amazon-ads.jar file. My next suspicion would be for a conflicting library. Is this possible? I saw a different Amazon ad library on the forums. Is it possible you installed this and it may be conflicting somehow? I am in the USA and I believe you are in Germany? There is always the possibility that there is a difference between the underlying libraries we use – I have run into this problem in the past. I am a little suspicious of the things Amazon sometimes does. Barry.
GMan Well-Known Member Licensed User Longtime User May 23, 2014 #25 Ahh, 3.8 ... didn't noticed that. I am using still 2.71
Gunther Active Member Licensed User Longtime User May 4, 2015 #26 Hi, how one can detect if a user has clicked on the ads and/or the Ad was shown? Thanks! Last edited: May 4, 2015
canalrun Well-Known Member Licensed User Longtime User May 4, 2015 #27 Hello, I don't think I expose that event from the Amazon ads. You would have to search the Amazon Ad documentation to see if they offer this event, then modify and rebuild the library code (see post #2 to download) in Eclipse. Barry.
Hello, I don't think I expose that event from the Amazon ads. You would have to search the Amazon Ad documentation to see if they offer this event, then modify and rebuild the library code (see post #2 to download) in Eclipse. Barry.
Gunther Active Member Licensed User Longtime User May 4, 2015 #28 Hi, Unfortunatly there is no event that the User has clicked on the Banner. Thanks!
G-ShadoW Active Member Licensed User Longtime User May 5, 2015 #29 I get following errror AMZNAds - Ad did not load. Code: INTERNAL_ERROR, Message: Server Message: DISABLED_APP Click to expand... What I'm doing wrong ?
I get following errror AMZNAds - Ad did not load. Code: INTERNAL_ERROR, Message: Server Message: DISABLED_APP Click to expand... What I'm doing wrong ?
canalrun Well-Known Member Licensed User Longtime User May 6, 2015 #30 Hello, I am not familiar with this error at all, but I did a Google search and found: https://forums.developer.amazon.com/forums/thread.jspa?threadID=901 Maybe this will be of some help. Barry.
Hello, I am not familiar with this error at all, but I did a Google search and found: https://forums.developer.amazon.com/forums/thread.jspa?threadID=901 Maybe this will be of some help. Barry.
F Feten7 Member Licensed User Apr 11, 2016 #31 Hi all, specially Canalrun. I was trying to incluye Amazon ads with tour library but it seems new SDK is not working. Has someone tried it with the brand new one??? The error i get is: java.lang.NoSuchMethodError: No direct method <init> I wish i could download a previous versión but it seems impossible in Amazon's site. Thanks to all in advance
Hi all, specially Canalrun. I was trying to incluye Amazon ads with tour library but it seems new SDK is not working. Has someone tried it with the brand new one??? The error i get is: java.lang.NoSuchMethodError: No direct method <init> I wish i could download a previous versión but it seems impossible in Amazon's site. Thanks to all in advance
canalrun Well-Known Member Licensed User Longtime User Apr 11, 2016 #32 This wrapper is almost 2 years old. I'm sure Amazon has modified their SDK making this wrapper obsolete since then. I currently use Appodeal with good results. (They have previously posted to these forms.) They supply support for B4A. I hope their support continues. Barry.
This wrapper is almost 2 years old. I'm sure Amazon has modified their SDK making this wrapper obsolete since then. I currently use Appodeal with good results. (They have previously posted to these forms.) They supply support for B4A. I hope their support continues. Barry.
F Feten7 Member Licensed User Apr 11, 2016 #33 Ok. I've read about them and it's good to have someone dealing with SDK changes. I'm a newbie and was integrating ads on my own. Maybe Appodeal, StartApp or anyone that has B4A support can be the solution. I've been reading good reviews about Appodeal, but it's my first approach. Thanks, Barry.
Ok. I've read about them and it's good to have someone dealing with SDK changes. I'm a newbie and was integrating ads on my own. Maybe Appodeal, StartApp or anyone that has B4A support can be the solution. I've been reading good reviews about Appodeal, but it's my first approach. Thanks, Barry.
nicolino33 Active Member Licensed User Longtime User Sep 23, 2020 #34 Error: java.lang.NoSuchMethodError: No direct method <init>(Landroid/app/Activity;Lcom/amazon/device/ads/AdSize; )V in class Lcom/amazon/device/ads/AdLayout; or its super classes (declaration of 'com.amazon.device.ads.AdLayout' appears in base.apk)
Error: java.lang.NoSuchMethodError: No direct method <init>(Landroid/app/Activity;Lcom/amazon/device/ads/AdSize; )V in class Lcom/amazon/device/ads/AdLayout; or its super classes (declaration of 'com.amazon.device.ads.AdLayout' appears in base.apk)