Admob problem

@Rob

The bug report #32594 in another thread you mentioned is different than what I am saying here…

What I am saying is that adMob might cause “black screen”. The ad still shows but the reset of the screen becomes black.

This is a totally different bug.

I saw someone saying the same problem here: http://stackoverflow.com/questions/11790376/animated-mopub-admob-native-ads-overlayed-on-a-game-black-out-screen

“Problem is, when the ad happens to be one with multiple frames, as the frames change, the rest of the screen goes blank (i.e., the game vanishes and users are left with a black screen with the banner ad still dutifully rendering in the top)”

This problem is much more complicated and I hope Corona can investigate on this carefully.

Is there a bug  report for that bug?

No, because I can’t reproduce it.

NOTE: One thing here is that both stackoverflow topics referred to above are from May last year. Also the OP (mark.biggiero) posted *this* topic in August last year. A lot has changed since then with G2.0 and all, so some of the issues might be irrelevant to G2.0 builds/new plugins etc. I don’t know, but it’s something to think about.

In my testing with the Admob V2 plugin I haven’t seen this “black-screen” issue, even with ads that have multiple frames.

I sat for basically an hour yesterday playing with a test app of mine and staring at my Galaxy Player 5.8’s screen (Android 4.0.4) with an Admob ad at the top and no black screen was seen. Ads were refreshed every 30 seconds.

@ingemar

Thanks for the info.

The black screen seems to happen in certain combination of Android devices & Android OS version. 80%-90% of my Android users don’t see black screen either, only some of them. And for those who can see the black screen, they don’t see it every time when an ad is shown, only about 20%~30% of time. If you have tested it for an hour, I think you can’t reproduce it either.

I have a vague memory that I’ve seen this waaaaaaay back on an Android 2.3 device.

However I don’t support anything older than 4.0 anymore which is maybe the reason I can’t reproduce it.

According to mark.biggiero earlier messages:

that black screen problem happens only on 4.3.0. on older androids it works fine

 

EDIT: after some testing, i noticed that that black screen vanishes after i turn off and turn on the screen. so i guess this is gonna be a work around for now

He is also seeing this black screen (see his attached screenshot in the first post, the ad shows but the rest of screen is blacked out) but with Android 4.3.0.

This might not be an “old” problem.

Besides, he is saying “turn off & turn on the screen” to work around this problem. I really don’t understand what he means to turn off & turn on the screen.

Hmmm… In that case it looks like it’s an Android problem that CoronaLabs has no control over.

 I really don’t understand what he means to turn off & turn on the screen.

I’d assume turn the device off and then on again.

This “trick” helps with another Admob issue where the first banner ad isn’t always shown.

This is not a programming trick at all.  :(  I can’t tell my users to do so.

Blank screen is a very bad user experience.

Maybe Corona should also investigate the suggestion in StackOverflow? http://stackoverflow.com/questions/11790376/animated-mopub-admob-native-ads-overlayed-on-a-game-black-out-screen

adView.setLayerType(View.LAYER\_TYPE\_SOFTWARE, null);

It’s a bad user experience for sure, and bound to lead to negative reviews.

However the problem always comes back to if we can’t reproduce the problem, and CoronaLabs can’t reproduce the problem, it’s not possible for them to test solutions that might fix it.

@mark.biggiero

What do you mean “turn on & turn off the screen”?

My Android users (no iOS) are reporting that they are seeing black screen in my app, and I am wondering admob causes this too. I cannot reproduce it, but there are many users are reporting this to me.

Can you post your build.settings and your ad.init and ad.show code?

My build.settings code:

settings = { orientation = { default = "portrait", supported = { "portrait", "portraitUpsideDown" }, }, iphone = { plist = { UIStatusBarHidden = true, UIPrerenderedIcon = true, CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", "Icon-Small.png", "Icon-Small@2x.png", }, CFBundleDisplayName = "MyApp", } }, android = { versionCode = "1882", usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_FINE\_LOCATION", "android.permission.ACCESS\_COARSE\_LOCATION", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.READ\_PHONE\_STATE", "android.permission.WRITE\_EXTERNAL\_STORAGE", }, usesFeatures = { { name = "android.hardware.location", required = false }, { name = "android.hardware.location.gps", required = false }, { name = "android.hardware.location.network", required = false }, }, }, plugins = { ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs", }, ["CoronaProvider.analytics.flurry"] = { publisherId = "com.coronalabs", }, ["CoronaProvider.ads.iads"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone = true }, }, ["CoronaProvider.ads.admob"] = { publisherId = "com.coronalabs", -- supportedPlatforms = { android = true }, }, ["facebook"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone = true }, }, }, }

My ad.init() & ad.show() code

local ads = require "ads" local mAdmobId\_iPhone = "xxxx" local mAdmobId\_iPad = "yyyy" local mAdmobId\_Android = "zzzz" local function adMobListener( event ) if (event == nil) then return end print("adMobListener =\> event.provider = ", event.provider) print("adMobListener =\> event.isError = ", event.isError) print("adMobListener =\> event.type = ", event.type) print("adMobListener =\> event.response = ", event.response) if (event.isError == true) then else end end if (tools.isApple() == true) then if (tools.isApplePad() == false) then ads.init( "admob", mAdmobId\_iPhone, adMobListener ) else ads.init( "admob", mAdmobId\_iPad, adMobListener ) end else ads.init( "admob", mAdmobId\_Android, adMobListener ) end ads:setCurrentProvider("admob") function M.hideBottomAd() print("hideBottomAd -\> trying to hide ad") ads.hide() end function M.showBottomAd() print("trying to show admob...") ads.show("banner", {x=leftX, y=bottomY +10000}) return true end

I think I am not doing anything fancy for showing the adMob ad.

For certain devices/Android version, adMob would cause the blank screen, but not every time, about 30% of the time.

I saw someone saying the same problem here: http://stackoverflow.com/questions/11790376/animated-mopub-admob-native-ads-overlayed-on-a-game-black-out-screen

 

When the ad has “multi-frames”, the screen will go black for certain devices/Android version.

 

And someone offers a solution by adding this line of code in Android native code:

adView.setLayerType(View.LAYER\_TYPE\_SOFTWARE, null);

Do you think it is the same case here?

 

Or any suggestion to avoid the black screen? 

Can you go ahead and file a bug report?

Thanks

Rob

Never mind, a bug report as been filed:   32594  

In this thread:  http://forums.coronalabs.com/topic/47222-admob-v2-plugin-test-results/

Rob

@Rob

The bug report #32594 in another thread you mentioned is different than what I am saying here…

What I am saying is that adMob might cause “black screen”. The ad still shows but the reset of the screen becomes black.

This is a totally different bug.

I saw someone saying the same problem here: http://stackoverflow.com/questions/11790376/animated-mopub-admob-native-ads-overlayed-on-a-game-black-out-screen

“Problem is, when the ad happens to be one with multiple frames, as the frames change, the rest of the screen goes blank (i.e., the game vanishes and users are left with a black screen with the banner ad still dutifully rendering in the top)”

This problem is much more complicated and I hope Corona can investigate on this carefully.