ads.isAdAvailable = always true? (Android)

Hi guys,

Have you encountered recently similar problem as I do?

I have two versions of my app - iOS and Android one, and while on iOS ads.isAdAvailable works fine, 

on the Android version, since friday, when I call ads.isAdAvailable - I always get true,

even if later the listener prints: event.isError = true  when it’s trying to show the ad.

So the app is trying to show Vungle, but it can’t. Previously it was working just fine so I’m confused…

Also tried with CoronaProvider.ads.vungle. prefix but with no luck - it’s the same.

Any experience on that issue?

Thanks

Hey, @whammy, have you figure this out?  I’m now using ads.isAdAvailable on Android, and it was working yesterday, but today, it isn’t.  When I print out what ads.isAdAvailable() returns on terminal now, it shows it returns a function, not a boolean.  I mean:

[lua]

local result = ads.isAdAvailable()

print("Is vungle available = " … tostring(result))

– this prints the following:  Is vungle available = function: 0x6b737560

[/lua]

The plugin documentation says ads.isAdAvailable() returns a boolean:  http://docs.coronalabs.com/daily/plugin/vungle/isAdAvailable.html

There’s something wrong.  I wonder why it returns a function instead of a boolean – and mind you, it returned a boolean yesterday but not today.  Very strange.

Naomi

Edit 2:  For now, I’m thinking of changing my code from if result == false then show another ad to if result ~= true then show another ad (because with if result == false then statement, my ad screen simply hangs, waiting for vungle ad to show up.)

Edit 2:  I emailed an inquiry about this to vungle tech support.  Let’s hope we’ll hear back from them.

@Naomi, nope I didn’t solve it. It also happend sometimes on iOS so my app freezed waiting for an ad that wasn’t showing… I emailed vungle and they were supposed to check it and let me know, as they didn’t encounter this problem before.

If I get a response from vungle I’ll post it here.

@whammy, I heard back from vungle, and they identified the issue and the fix has been submitted to Corona.  That was so fast.  Apparently, the updated plugin they rolled out yesterday had some issue.  It should start working fine again once you generate a new build with the updated plugin (expected to be available in an hour or two.)

Naomi

OK, that’s great! Thanks for the info!

Hey, @whammy, have you figure this out?  I’m now using ads.isAdAvailable on Android, and it was working yesterday, but today, it isn’t.  When I print out what ads.isAdAvailable() returns on terminal now, it shows it returns a function, not a boolean.  I mean:

[lua]

local result = ads.isAdAvailable()

print("Is vungle available = " … tostring(result))

– this prints the following:  Is vungle available = function: 0x6b737560

[/lua]

The plugin documentation says ads.isAdAvailable() returns a boolean:  http://docs.coronalabs.com/daily/plugin/vungle/isAdAvailable.html

There’s something wrong.  I wonder why it returns a function instead of a boolean – and mind you, it returned a boolean yesterday but not today.  Very strange.

Naomi

Edit 2:  For now, I’m thinking of changing my code from if result == false then show another ad to if result ~= true then show another ad (because with if result == false then statement, my ad screen simply hangs, waiting for vungle ad to show up.)

Edit 2:  I emailed an inquiry about this to vungle tech support.  Let’s hope we’ll hear back from them.

@Naomi, nope I didn’t solve it. It also happend sometimes on iOS so my app freezed waiting for an ad that wasn’t showing… I emailed vungle and they were supposed to check it and let me know, as they didn’t encounter this problem before.

If I get a response from vungle I’ll post it here.

@whammy, I heard back from vungle, and they identified the issue and the fix has been submitted to Corona.  That was so fast.  Apparently, the updated plugin they rolled out yesterday had some issue.  It should start working fine again once you generate a new build with the updated plugin (expected to be available in an hour or two.)

Naomi

OK, that’s great! Thanks for the info!

I have the same problem that you had… can you solved it?

I have the same problem that you had… can you solved it?

I have some problems using _G.ads.isAdAvailable()

As you can see I’m using a global variable for the ads in main.lua… but it should work, right?

Instead when looking for the boolean (in another lua file, after main.lua was called) with _G.ads.isAdAvailable() I always get the following error:

“attempt to call field ‘isAdAvailable’ (a nil value)”

Can anyone please explain to me, what I’m doing wrong here?

Thx for all help!

I have some problems using _G.ads.isAdAvailable()

As you can see I’m using a global variable for the ads in main.lua… but it should work, right?

Instead when looking for the boolean (in another lua file, after main.lua was called) with _G.ads.isAdAvailable() I always get the following error:

“attempt to call field ‘isAdAvailable’ (a nil value)”

Can anyone please explain to me, what I’m doing wrong here?

Thx for all help!

I have something interesting, I have this in the corona simulator console:
 

lua:78: attempt to call field ‘isAdAvailable’ (a nil value)

However, if I dont care about corona simulator and I build for device, I can compile and run the game in my iPhone5 and the Vungle ad works correctly, and there is no error in the xCode organizer console.

So I think maybe this is a problem related to corona simulator?

I have something interesting, I have this in the corona simulator console:
 

lua:78: attempt to call field ‘isAdAvailable’ (a nil value)

However, if I dont care about corona simulator and I build for device, I can compile and run the game in my iPhone5 and the Vungle ad works correctly, and there is no error in the xCode organizer console.

So I think maybe this is a problem related to corona simulator?