Ads sample project not showing ads

Ok thanks for your help.
what I ment is that I download the latest ‘daily build’ as seen on corona developer center download page, my 2018 build was the pubic build (should be most stable really.).
Anyway, I downloaded the latest build from GitHub via the link on top of this page, the build which has been released 3 days ago 2020.3595 .

I added my device to Inmobi tests devices and rebuild the app with the new simulator version.
same error

I/Corona (21217): plugin.inMobi: 1.1.9 (SDK: 7.1.1)
I/Corona (21217): phase init
I/Corona (21217): provider inMobi
I/Corona (21217): name adsRequest
I/Corona (21217): isError false
I/Corona (21217): InMobi event: initialization successful
I/Corona (21217): placementId 15794639xxxxx
I/Corona (21217): type banner
I/Corona (21217): name adsRequest
I/Corona (21217): phase failed
I/Corona (21217): provider inMobi
I/Corona (21217): isError true
I/Corona (21217): response REQUEST_INVALID - Please check the site status on InMobi dashboard or reach out to PartnerManager

its strange that it works for you but not for me, I don’t think it is something with corona , its inmobi, still it works for you so how is it possible?

Compare your settings to mine (images match numbers in order):

  1. An app w/o App URL (i.e. unpublished app w/ no store listing yet)

  2. Two placements: Banner & Interstitial

  3. Both placements have Diagnostics->Test Mode set to ‘Global On’ (default for unpublished)

  4. Interstitial (which works) has the settings shown.

  5. My phone ID is registered as a test device.





OK. I tried to build test apps for: adMob, Applovin, and Vungle.

All failed. So, for now I don’t have any more help I can offer.

What do you mean?? none of this ad services work?
what the heck is going on? what I am suppose to do??? you telling me you cant use ads on corona apps now?

I apricate your help, anyone on this forums using ads? someone has to know something !

I’m probably missing something here. I haven’t yet had time to:

  • Go back and read all the posts since the transition to the new forums and new builds.
  • Get set up for building locally.
  • Talk to my colleagues.

If this isn’t working now (not yet confirmed), I’m sure it is a temporary issue. I’m sorry for the frustration this is causing you, but I’m sure we’ll get this worked out given enough time.

@tal_nahum - GOOD NEWS…

Using Corona SDK 2018.3326 I successfully built and showed ads for:

  • AppLovin - Interstitial
  • Vungle 4 - Interstitial
  • Vungle 4 - Incentivized
  • Vungle 5 - Interstitial
  • inMobi – Interstitial

Current plugins tests and notes: https://github.com/roaminggamer/RG_FreeStuff/tree/master/AskEd/2020/05/plugins_help/ads

Kit of mini-samples: https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2020/05/plugins_help.zip

Note: I have been so accustomed to using the latest version of Corona/Solar2D that it never really occurred to me that (in this time of transition) various versions might have issues for certain tasks.

So… I went back and did a full reset on my thinking. I created an initial set of plugins tests, focusing on ads only for now. See link above.

I will continue to add to this over time, but I’ll post about this in a separate thread.

For now, I hope this gets you unstuck.

1 Like

I’ve just been following this from the sidelines as I haven’t had anything worthwhile to contribute, but damn, that’s some dedicated support @roaminggamer.

@XeduR I just hate leaving things ‘not working’. :slight_smile:

@tal_nahum - When you go test this, I strongly suggest you use the mini examples I provided and add your IDs to main.lua/build.settings as appropriate. This way the test is separated from your game and you can focus on just the ads.

dam right he is, you are amazing thanks for your help, I would’ve been cluless without you
yet some tips, I mentioned that 2018.3326 is the public build and most stable, also the first suggestion to switch accountID with bannerPlacementID was out of place, and I knew it will not work, but you got things right in your mind after that…

I was will dig into what you posted and replay back, I really hope it will help, but I think that with inMobi its just the plugins fault

I tried vungle and used your sample code … the interstitial add showed once and then the rest of the times it said that there are no available ads to show right now, the banner ad didn’t show, said id was wrong, maybe because I was using SDK 5.1 and the banner required SDK 6.5 + , anyway I don’t know if the lack of ads are result of test mode, because if this is how it behaves live than it is worthless…
many of the ad services requires publishing the app first, so I dunno maybe I will have to do it, but then I will need to update my code and reupload to google play, u have experience with this? also you managed to test some other ad services by this time?, its really shame how lame those companies performe with their product… I didn’t know ads would be such a pain

I had a similar experience when I first setup Vungle (before the corona -> solar transition) It displayed 1 test ad, then I could never get it show another. I released it anyway because I was only using it on Amazon. Apparently it worked because it showed a few impressions. But once appodeal started working for amazon, I switched to that.

and how is appodeal is working for you? showing enough ads? setup was good ?

I just test admob with sample project, works like magic ! finally :sob:
a product by google , miles better then those trash services. big disadvantage is the payout threshold, really high

EDIT: I managed to show banner ad, and interstitial ad only once, then I get warning that ad could not load, im checking this now…

ok so im using admob, and the ads are showing as intended using sample project and ur project

yet I am having trouble on my own project…
I am using scenes architecture its very similar to the getting started app

main.lua -> menu.lua -> game.lua

in main I initialize admob, like this:

Summary
 local composer = require( "composer" )

-- Hide status bar
display.setStatusBar( display.HiddenStatusBar )

-- Seed the random number generator
math.randomseed( os.time() )
 admob = require( "plugin.admob" )

 -- Preset the AdMob app ID (replace this with your own for testing/release)

 -- This ID must be generated within the AdMob dashboard: https://apps.admob.com/

 local appID = "ca-app-pub-5779536996924****"



 -- Preset AdMob unit IDs (replace these with your own)

 -- These unit IDs must be generated within the AdMob dashboard: https://apps.admob.com/

 local bannerUnitID = "ca-app-pub-577953699692***"

 local  interstitialUnitID = "ca-app-pub-5779536996****"

 --ad Listener function
 local function adListener( event )
   if ( event.phase == "init" ) then  -- Successful initialization
           -- Load an AdMob banner ad and interstitial ad
		   print("init")
		admob.load( "interstitial", { adUnitId = interstitialUnitID } )
        admob.load( "banner", { adUnitId = bannerUnitID } )
           -- An ad loaded successfully
     	elseif ( event.phase == "loaded" ) then
		if (event.type == "banner") then
			admob.load( "banner", { adUnitId = bannerUnitID } )
			print("banner")
		 elseif (event.type == "interstitial") then
			admob.load( "interstitial", { adUnitId = interstitialUnitID } )
			print("interstitial")
           end
       end
   end


  admob.init( adListener, { appId=appID, testMode=true } )

-- Go to the menu screen
composer.gotoScene( "menu" )

that’s it, I tried using admob.show() inside scene:show function but I will get errors like cannot call init more then once… so right now , without any other code related to ads in my project, I get this :

I/Corona (18635): plugin.admob: 1.2.6 (SDK: 12451000)
I/Corona (18635): init
I/Corona (18635): banner
I/Corona (18635): interstitial
I/Corona (18635): banner
I/Corona (18635): interstitial
I/Corona (18635): banner
I/Corona (18635): interstitial
I/Corona (18635): banner
I/Corona (18635): show
I/Corona (18635): banner


also :

I/Corona (18635): plugin.admob: Test mode active for device ‘E012F5C59D8EF566E1CFCFCABD8B1A49’
I/Corona (18635): interstitial
I/Corona (18635): plugin.admob: Test mode active for device ‘E012F5C59D8EF566E1CFCFCABD8B1A49’
I/Corona (18635): banner
I/Corona (18635): plugin.admob: Test mode active for device ‘E012F5C59D8EF566E1CFCFCABD8B1A49’
I/Corona (18635): banner
I/Corona (18635): plugin.admob: Test mode active for device ‘E012F5C59D8EF566E1CFCFCABD8B1A49’
I/Corona (18635): interstitial

I have a gameloop ofcourse, but im not calling admob anywhere else
I tried doing it without this part:

elseif ( event.phase == "loaded" ) then
		if (event.type == "banner") then
			admob.load( "banner", { adUnitId = bannerUnitID } )
			print("banner")
		 elseif (event.type == "interstitial") then
			admob.load( "interstitial", { adUnitId = interstitialUnitID } )
			print("interstitial") 

it still gives me other errors like:

I/Corona (13714): ERROR: admob.isLoaded(adType [, options]), admob.init() must be called before calling other API functions

and

I/Corona (13714): WARNING: admob.init(listener, options), init() should only be called once

I have tried also using ur “test” function but and call It inside game.lua, but the init wont recognize the adlistener because its inside another function

basically im confusing, I need a simple solution to make things work right, because the services works well… its all about the coding
by the way, when installing my app (using android “File Manager”) the app crashes and restart 3 times before starting (only at the first time) that didn’t happen before starting to deal with ads