Corona Ads not showing up

Hello.

Ads are not showing up on device. Here are the facts as I know:

Corona Ads dashboard says that the ads are live.

Here is my build setting:

settings = { android = { versionCode = "9", usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.ACCESS\_FINE\_LOCATION", "android.permission.ACCESS\_COARSE\_LOCATION", "android.permission.RECEIVE\_BOOT\_COMPLETED", }, applicationChildElements = { [[\<activity android:name="com.facebook.ads.InterstitialAdActivity" android:configChanges="keyboardHidden|orientation|screenSize"/\>]] }, }, usesFeatures = { { name="android.hardware.location.gps", required=false }, }, orientation = { default = "portrait", supported = { "portrait", "portraitUpsideDown" } }, plugins = { ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["shared.android.support.v4"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["plugin.coronaAds"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true, ["amazon-kindle"]=true, iphone=true } } }, }

I ran adb and here is what came out:

I/dalvikvm( 9242): Could not find method android.app.Activity.checkSelfPermission, referenced from method com.coronalabs.coronaads.CoronaAds.loadMobFoxBanner W/dalvikvm( 9242): VFY: unable to resolve virtual method 297: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I D/dalvikvm( 9242): VFY: replacing opcode 0x6e at 0x0080 I/dalvikvm( 9242): Could not find method android.app.Activity.checkSelfPermission, referenced from method com.coronalabs.coronaads.CoronaAds.loadMobFoxInterstitial W/dalvikvm( 9242): VFY: unable to resolve virtual method 297: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I D/dalvikvm( 9242): VFY: replacing opcode 0x6e at 0x0026 I/dalvikvm( 9242): Could not find method android.content.Context.checkSelfPermission, referenced from method com.coronalabs.coronaads.DeviceInfo.\<init\> W/dalvikvm( 9242): VFY: unable to resolve virtual method 498: Landroid/content/Context;.checkSelfPermission (Ljava/lang/String;)I D/dalvikvm( 9242): VFY: replacing opcode 0x6e at 0x0094 D/LocationManagerService( 839): request 42a75550 network Request[POWER\_LOW network requested=0 fastest=0] from com.peaceoutgames.stayzen(10173) D/LocationManagerService( 839): provider request: network ProviderRequest[ON interval=0] V/GmsNetworkLocationProvi( 1467): onSetRequest: ProviderRequestUnbundled, reportLocation is true and interval is 0 V/GmsNetworkLocationProvi( 1467): SET-REQUEST V/GmsNetworkLocationProvi( 1467): in Handler: ProviderRequestUnbundled, reportLocation is true and interval is 20000 D/LocationManagerService( 839): getLastLocation: Request[POWER\_LOW network requested=0 fastest=0 num=1]

To me this looks like a permission issue but I’m not sure how to resolve it. Any help would be greatly appreciated. 

I see two apps under your Corona Ads account both of which are configured to show live ads. I built the sample app [https://github.com/coronalabs/plugins-sample-coronaAds] using your apps’ api key and was able to see live ads [banners and interstitial] - this traffic should be reflected on your dashboard soon.

However, I see no previous traffic from either your apps so far, which could possibly be an integration issue. Could you confirm that your code waits for coronaAds.init to finish [wait for event.phase ‘init’] before calling coronaAds.show?

vamsee

Hi. Thanks for the reply. I’ve posted my code below which used the Corona documentation for init and show. I’m reading it to mean that it is showing after the init. But I think I’m obviously messing something up. 

local coronaAds = require( “plugin.coronaAds” )

local interstitialPlacement = “interstitial-1”    

local function adListener( event ) – Successful initialization of Corona Ads if ( event.phase == “init” ) then – Show an ad --coronaAds.show( bannerPlacement, false ) coronaAds.show( interstitialPlacement, true ) end end – Initialize Corona Ads (substitute your own API key when generated) coronaAds.init( “MY API CODE”, adListener ) end

Sorry - Not sure why my code wasn’t boxed. 

local coronaAds = require( "plugin.coronaAds" ) local interstitialPlacement = "interstitial-1" local function adListener( event ) -- Successful initialization of Corona Ads if ( event.phase == "init" ) then -- Show an ad --coronaAds.show( bannerPlacement, false ) coronaAds.show( interstitialPlacement, true ) end end -- Initialize Corona Ads (substitute your own API key when generated) coronaAds.init( "MY API KEY", adListener )

What i’ve discovered is that when you request ad’s then the Corona ad listener get’s called multiple times with various settings - what I’ve recommend is dumping out the event value each time it’s called and that should give you more of a clue as to what’s going on.

That’s a good idea! I’d also recommend using a proxy tool [such as https://www.charlesproxy.com] to see what sort of network calls are being made. There’s a network call associated with coronaAds.init and it should finish successfully when the plugin is correctly configured and integrated.

Thanks for the help. I will give it a try. I think you are right about something not being right with the network calls. I did manage to get the adcolony ads working.

Ok I am still unable to get it working. Here is what adb logcat gave me. Note that I put a print for when the ads were .init and .show

12-19 12:12:04.889 28186 28210 I Corona : INIT AD \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 12-19 12:12:04.889 28186 28210 I Corona : SHOW AD \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 12-19 12:12:04.909 3062 3062 E libEGL : eglMakeCurrent:1056 error 300b (EGL\_BAD\_NATIVE\_WINDOW) 12-19 12:12:04.909 3062 3062 W SurfaceFlinger: DisplayDevice::makeCurrent failed. Aborting surface composition for display DuScreenShot 12-19 12:12:04.929 28186 28186 E chromium: [ERROR:interface\_registry.cc(104)] Failed to locate a binder for interface: autofill::mojom::PasswordManagerDriver 12-19 12:12:04.949 28186 28186 W cr\_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 28186 12-19 12:12:04.949 28186 28186 E chromium: [ERROR:interface\_registry.cc(104)] Failed to locate a binder for interface: autofill::mojom::PasswordManagerDriver 12-19 12:12:04.959 28186 28186 W cr\_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 28186 12-19 12:12:04.959 28186 28186 E chromium: [ERROR:interface\_registry.cc(104)] Failed to locate a binder for interface: autofill::mojom::PasswordManagerDriver 12-19 12:12:04.959 28186 28186 W cr\_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 28186 12-19 12:12:04.969 28186 28798 E libEGL : validate\_display:255 error 3008 (EGL\_BAD\_DISPLAY) 12-19 12:12:04.969 28186 28798 D libEGL : eglInitialize EGLDisplay = 0xd3abf354 12-19 12:12:04.969 28186 28798 D libEGL : eglInitialize EGLDisplay = 0xd3abf4bc 12-19 12:12:04.969 28186 28798 D : ro.exynos.dss isEnabled: 0 12-19 12:12:04.979 3509 3509 D CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS\_MIN\_LIMIT frequency : 800000 uid : 1000 pid : 3509 tag : GESTURE\_DETECTED@CPU\_MIN@37

I’d say that you shouldn’t try to work to much on a fix as Coronaads as we know it is now deprecated if I understand correctly the message of Rob of today.

I was curious because since today I wasn’t able to go to my “monetization” dashboard but what Rob said is a start as an explanation…

I see two apps under your Corona Ads account both of which are configured to show live ads. I built the sample app [https://github.com/coronalabs/plugins-sample-coronaAds] using your apps’ api key and was able to see live ads [banners and interstitial] - this traffic should be reflected on your dashboard soon.

However, I see no previous traffic from either your apps so far, which could possibly be an integration issue. Could you confirm that your code waits for coronaAds.init to finish [wait for event.phase ‘init’] before calling coronaAds.show?

vamsee

Hi. Thanks for the reply. I’ve posted my code below which used the Corona documentation for init and show. I’m reading it to mean that it is showing after the init. But I think I’m obviously messing something up. 

local coronaAds = require( “plugin.coronaAds” )

local interstitialPlacement = “interstitial-1”    

local function adListener( event ) – Successful initialization of Corona Ads if ( event.phase == “init” ) then – Show an ad --coronaAds.show( bannerPlacement, false ) coronaAds.show( interstitialPlacement, true ) end end – Initialize Corona Ads (substitute your own API key when generated) coronaAds.init( “MY API CODE”, adListener ) end

Sorry - Not sure why my code wasn’t boxed. 

local coronaAds = require( "plugin.coronaAds" ) local interstitialPlacement = "interstitial-1" local function adListener( event ) -- Successful initialization of Corona Ads if ( event.phase == "init" ) then -- Show an ad --coronaAds.show( bannerPlacement, false ) coronaAds.show( interstitialPlacement, true ) end end -- Initialize Corona Ads (substitute your own API key when generated) coronaAds.init( "MY API KEY", adListener )

What i’ve discovered is that when you request ad’s then the Corona ad listener get’s called multiple times with various settings - what I’ve recommend is dumping out the event value each time it’s called and that should give you more of a clue as to what’s going on.

That’s a good idea! I’d also recommend using a proxy tool [such as https://www.charlesproxy.com] to see what sort of network calls are being made. There’s a network call associated with coronaAds.init and it should finish successfully when the plugin is correctly configured and integrated.

Thanks for the help. I will give it a try. I think you are right about something not being right with the network calls. I did manage to get the adcolony ads working.

Ok I am still unable to get it working. Here is what adb logcat gave me. Note that I put a print for when the ads were .init and .show

12-19 12:12:04.889 28186 28210 I Corona : INIT AD \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 12-19 12:12:04.889 28186 28210 I Corona : SHOW AD \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 12-19 12:12:04.909 3062 3062 E libEGL : eglMakeCurrent:1056 error 300b (EGL\_BAD\_NATIVE\_WINDOW) 12-19 12:12:04.909 3062 3062 W SurfaceFlinger: DisplayDevice::makeCurrent failed. Aborting surface composition for display DuScreenShot 12-19 12:12:04.929 28186 28186 E chromium: [ERROR:interface\_registry.cc(104)] Failed to locate a binder for interface: autofill::mojom::PasswordManagerDriver 12-19 12:12:04.949 28186 28186 W cr\_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 28186 12-19 12:12:04.949 28186 28186 E chromium: [ERROR:interface\_registry.cc(104)] Failed to locate a binder for interface: autofill::mojom::PasswordManagerDriver 12-19 12:12:04.959 28186 28186 W cr\_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 28186 12-19 12:12:04.959 28186 28186 E chromium: [ERROR:interface\_registry.cc(104)] Failed to locate a binder for interface: autofill::mojom::PasswordManagerDriver 12-19 12:12:04.959 28186 28186 W cr\_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 28186 12-19 12:12:04.969 28186 28798 E libEGL : validate\_display:255 error 3008 (EGL\_BAD\_DISPLAY) 12-19 12:12:04.969 28186 28798 D libEGL : eglInitialize EGLDisplay = 0xd3abf354 12-19 12:12:04.969 28186 28798 D libEGL : eglInitialize EGLDisplay = 0xd3abf4bc 12-19 12:12:04.969 28186 28798 D : ro.exynos.dss isEnabled: 0 12-19 12:12:04.979 3509 3509 D CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS\_MIN\_LIMIT frequency : 800000 uid : 1000 pid : 3509 tag : GESTURE\_DETECTED@CPU\_MIN@37

I’d say that you shouldn’t try to work to much on a fix as Coronaads as we know it is now deprecated if I understand correctly the message of Rob of today.

I was curious because since today I wasn’t able to go to my “monetization” dashboard but what Rob said is a start as an explanation…