Issue with admob in an Amazon build

I am converting an app for Amazon Appstore that currently runs just fine over Google Play. I am in the testing process and and getting a crash. The log looks like this:

 

/Users/jenkins/slaveroot/workspace/Templates/label/android/librtt/Corona/CoronaLibrary.lua:94: ERROR: Could not load provider (admob) due to the following reason: /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:820: module ‘CoronaProvider.ads.admob’ not found:resource (CoronaProvider.ads.admob.lu) does not exist in archive

I/Corona  (16018): no field package.preload[‘CoronaProvider.ads.admob’]

I/Corona  (16018): no file ‘(null)/CoronaProvider.ads.admob.lua’

I/Corona  (16018): no file ‘(null)/CoronaProvider.ads.admob.lua’

I/Corona  (16018): no file ‘/data/app-lib/com.steelmangames.lou.rpgsidekick-1/libCoronaProvider.ads.admob.so’

I/Corona  (16018): no file ‘./CoronaProvider.ads.admob.so’

I am testing on a galaxy s3, the same device I used for testing for the GP version. What appears to be going on is that the module is not getting loaded into the Amazon store build, is that right? I haven’t changed any of the admob code, I just built it for the Amazon store.

I’ve been researching this and have been seeing some conflicting info, one of the things I have seen is that Corona doesn’t support the Amazon ads system. That is fine with me as long as I can use admob. I have also seen other people having trouble getting admob to work on a kindle.

Can you advise about what is causing the admob module not to be loaded? What is the Corona way to make this work?

Thanks in advance.

Ok, by beating my head against the wall a bit, I was able to figure out that the old admob plugin was needed. The app no longer crashes, which is good, and it shows ads.

However, there are some lingering questions, like… am I going to need to maintain two different build.settings files or can I just have both plugins in my build.settings folder and each build (gp and Amazon) correctly choose the right one? I understand that as far as Google is concerned, the old plugin is deprecated, does this mean they are going to stop serving ads to it?

Again, thanks for your help.

Ok, by beating my head against the wall a bit, I was able to figure out that the old admob plugin was needed. The app no longer crashes, which is good, and it shows ads.

However, there are some lingering questions, like… am I going to need to maintain two different build.settings files or can I just have both plugins in my build.settings folder and each build (gp and Amazon) correctly choose the right one? I understand that as far as Google is concerned, the old plugin is deprecated, does this mean they are going to stop serving ads to it?

Again, thanks for your help.

This issue has become relevant again. Because you discontinued the old admob plugin the solution above no longer works.

Bottom line, admob plugin is not working on kindle fire.

I am using a kindle HD 7in tablet.

I am using Corona version 2015.2646

This is what is in build.settings:

[lua][“plugin.google.play.services”] =

        {

                publisherId = “com.coronalabs”,

                supportedPlatforms = { iphone = true, android=true, [“android-kindle”]=true },

        },[/lua]

This is where I initialize it:

[lua]local ads = require(“ads”)

if (system.getInfo(“platformName”) == “Android”) then

     if store.target == “amazon” then

          ads.init(“admob”, amazonAdmobID, adMobListener)

     else

          ads.init(“admob”, googleAdmobID, adMobListener)

     end

end[/lua]

Is there a solution for this?

Based on some information provided in another thread, I was able to resolve this issue. This simple solution is to not specify a platform in the build.settings:

[lua][“plugin.google.play.services”] =

        {

                publisherId = “com.coronalabs”,

        },[/lua]

the tag [“android-kindle”]=true was borrowed from the plugin.amazon.iap plugin and apparently Corona is not using that tag for Amazon. However, Corona has not documented what tag they are using for amazon so… as long as you are using admob on all platforms you can just leave off supportedPlatforms and it will work as expected on Kindle.

This issue has become relevant again. Because you discontinued the old admob plugin the solution above no longer works.

Bottom line, admob plugin is not working on kindle fire.

I am using a kindle HD 7in tablet.

I am using Corona version 2015.2646

This is what is in build.settings:

[lua][“plugin.google.play.services”] =

        {

                publisherId = “com.coronalabs”,

                supportedPlatforms = { iphone = true, android=true, [“android-kindle”]=true },

        },[/lua]

This is where I initialize it:

[lua]local ads = require(“ads”)

if (system.getInfo(“platformName”) == “Android”) then

     if store.target == “amazon” then

          ads.init(“admob”, amazonAdmobID, adMobListener)

     else

          ads.init(“admob”, googleAdmobID, adMobListener)

     end

end[/lua]

Is there a solution for this?

Based on some information provided in another thread, I was able to resolve this issue. This simple solution is to not specify a platform in the build.settings:

[lua][“plugin.google.play.services”] =

        {

                publisherId = “com.coronalabs”,

        },[/lua]

the tag [“android-kindle”]=true was borrowed from the plugin.amazon.iap plugin and apparently Corona is not using that tag for Amazon. However, Corona has not documented what tag they are using for amazon so… as long as you are using admob on all platforms you can just leave off supportedPlatforms and it will work as expected on Kindle.