Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Admob ads are not displayed
Started by appzari May 02 2018 05:53 AM

7 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

appzari

[GLOBAL: userInfoPane.html]
appzari
  • Observer

  • 5 posts
  • Corona SDK

Regards,
 
On April 28, I acquired the amob plugin of payment, from that moment I undertook the implementation of the announcements in my apps, but I have tried everything and the announcements are not shown. I have tried with the sample of admob of the documentation as well as basic code of the api without any display of the announcements, also try to look for my problem in the forum and finally with the admon dashboard. Finally I just have to ask for help for the forum to solve the problem.
 
I apologize for my English.
 
 


[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,753 posts
  • Corona Staff

Can you post your code where you are initializing the plugin? Where you are calling the .show() function? And your build.settings?  Please make sure that for each chunk of code you're sharing, click on the blue <> button in the row with Bold and Italic and paste your code into the popup window.

 

Rob



[TOPIC: post.html]
#3

appzari

[GLOBAL: userInfoPane.html]
appzari
  • Observer

  • 5 posts
  • Corona SDK

Rob, greetings, thank you for attending,

 

Basically the code that I am using is the one of the example.

https://github.com/coronalabs/plugins-sample-admob https://github.com/coronalabs/plugins-sample-admob

 

I have also tried with the example code of admob that is in the API without success in the result. I have not managed to visualize the ads.
 
I would like to know if besides calling the plugin in build.settings and the basic code to show an ads, some other action is required.
 
I could share my appId to check if something is wrong.


[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,753 posts
  • Corona Staff

You have to include the plugin in build.settings. You have to call the .init() API in main.lua with a listener function. This listener function should print out any responses from the server so you can know what's going on.  Then depending on ad type, you will need to call the .load() api and the .show() api.  You will have to provide both app and developer ID's that are properly configure in the AdMob portal.

 

Finally you have to test on a real device. Ads do not work in the simulator.

 

Rob



[TOPIC: post.html]
#5

appzari

[GLOBAL: userInfoPane.html]
appzari
  • Observer

  • 5 posts
  • Corona SDK

Greetings Rob, thank you for attending,
 
I think I have done everything you mention, so far I have made more than 50 variations of code from the most basic we find in the API as well as more complicated implementations all tested on the device since the admob plugin does not work in the compiler. Hence my decision to publish my problem in the forum, thinking that I have been able to omit something on the admob side or another additional indication. I've been trying to solve this without success for 5 days.
 
Your answer generates a concern, the appId is the (Developer ID)? or is the (Id of the App) that is generated when we create an app in admob.
 
Finally I would like to know what I can do in this case.


[TOPIC: post.html]
#6

davebollinger

[GLOBAL: userInfoPane.html]
davebollinger
  • Corona Geek

  • 1,087 posts
  • Enterprise

you need an "App ID" and at least one "Ad unit ID" (banner and/or interstitial and/or video, whatever, per your usage).  those are the terms Admob itself uses.  to find the App ID:  Monetize, select app at left, expand the "view setup instructions".  Ad units, and their ID's, are listed just below that



[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,753 posts
  • Corona Staff

It's very important that you print out the response values in your adListener function. Then plug your test device into the USB port of your computer. For Android, you can use Android Studio or use the command line "adb logcat" command (may need to install the adb tools to use it).  If you're on a Mac, Corona will magically route the device's console log to the Corona console log for you.

 

But until you see "why" AdMob is telling you it's not showing ads you're guessing in the dark.

 

Find out what's being reported please.

 

Rob



[TOPIC: post.html]
#8

appzari

[GLOBAL: userInfoPane.html]
appzari
  • Observer

  • 5 posts
  • Corona SDK

Hi Rob,
 
Finally after so many attempts I managed to solve my problem of viewing ads. First of all note that in the admob dashboard the requests were being generated but not the impressions, completely ruling out that you had a problem with admob. Performing a follow-up to each of the functions of the admob plugin (admob.init (), admob.load (), admob.isLoaded and admob.show ()) I found that in the example codes of the API and in the sample- admob did not work for me in the admob.show () function. Therefore I decided to make a condition in the adListener of init.admob () where after checking that the admob.load () was fulfilled, the function admob.show () will be executed. The result of this worked for me.
 
At the moment this solution is fine for me, although I am worried that the basic code of the api and the example code to implement the admob plugin will not work for me.
 
I appreciate the attention and collaboration provided.
 
I apologize for my English
 
Joseph



[topic_controls]
[/topic_controls]