Highlighted

Why does the screen go black when an ad appears?

Explorer ,
Apr 24, 2014

Copy link to clipboard

Copied

I have a game app for Android made with Adobe AIR. I have been using intersticial ads from TapForTap without problem, but now I've decided to try another ad provider (AdBuddiz), and when their ads appear, the game, behind the ad, goes completely black. When I close the ad, the game resumes, but the screen is completely black (although the game is running because I can hear the sounds responding to input). But if I press the home button, and then open the game again, the game resumes with the graphics showing again (until another ad appears again).

When I asked AdBuddiz for support, they said: "AdBuddiz SDK, when displaying an ad, is launching an Android native activity with the ad inside and a translucent background. The close button finishes the activity."

The ads from the other ad service I was using actually don't have a transparent background (they are fully opaque, full-screen), could that have something to do with it?

Maybe there's something I can do to "refresh" the graphics after closing the ad?

Also, in case this is relevant, I'm using the flixel game framework.

Any help is much appreciated, thanks!

TOPICS
Development

Views

2.4K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Why does the screen go black when an ad appears?

Explorer ,
Apr 24, 2014

Copy link to clipboard

Copied

I have a game app for Android made with Adobe AIR. I have been using intersticial ads from TapForTap without problem, but now I've decided to try another ad provider (AdBuddiz), and when their ads appear, the game, behind the ad, goes completely black. When I close the ad, the game resumes, but the screen is completely black (although the game is running because I can hear the sounds responding to input). But if I press the home button, and then open the game again, the game resumes with the graphics showing again (until another ad appears again).

When I asked AdBuddiz for support, they said: "AdBuddiz SDK, when displaying an ad, is launching an Android native activity with the ad inside and a translucent background. The close button finishes the activity."

The ads from the other ad service I was using actually don't have a transparent background (they are fully opaque, full-screen), could that have something to do with it?

Maybe there's something I can do to "refresh" the graphics after closing the ad?

Also, in case this is relevant, I'm using the flixel game framework.

Any help is much appreciated, thanks!

TOPICS
Development

Views

2.4K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 24, 2014 0
Adobe Community Professional ,
Apr 24, 2014

Copy link to clipboard

Copied

My guess is that their ad is so demanding that it wipes out all GPU textures. If you are using GPU mode you could change the stage quality when you show the ad, and change it back when the ad finishes, that should force the textures to reload. Not sure if the same trick works for Direct rendermode.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 24, 2014 1
Explorer ,
Apr 24, 2014

Copy link to clipboard

Copied

Thanks Colin. I am using GPU mode. Indeed, changing the stage quality does reload the textures, but only the first time... Changing the quality a second time doesn't reload the textures, so I get stuck with a black screen again

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 24, 2014 0
Adobe Community Professional ,
Apr 24, 2014

Copy link to clipboard

Copied

Are you changing the quality before showing the ad? Maybe you need to let a frame go by before showing the ad.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 24, 2014 0
Explorer ,
Apr 24, 2014

Copy link to clipboard

Copied

I am only changing after the ad is closed (I am alternating between setting to HIGH or BEST, since it seems that AIR only supports these two modes (but I also tried changing between BEST, HIGH, MEDIUM and LOW just to be sure)).

I also tried changing the quality only a few moments after the ad is closed, and the result is the same (graphics are reloaded only the first time).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 24, 2014 0
Adobe Community Professional ,
Apr 24, 2014

Copy link to clipboard

Copied

I was suggesting to change it before and after the ad. Also, if you’re just doing GPU you should be able to set the quality to Low, which will help performance.

Try setting it to medium before the ad comes up, and to low when the ad goes away.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 24, 2014 0
New Here ,
May 29, 2014

Copy link to clipboard

Copied

Hi I'm Etienne from AdBuddiz.

As described on that other post : Reporting: Adobe Air - Black Screen Bug Spotted

And also as Colin is saying, it seems that simply switching back and forth stage quality solves the bug :

stage.addEventListener(Event.ACTIVATE, fl_Activate);

stage.addEventListener(Event.DEACTIVATE, fl_Deactivate);

private function fl_Activate(event:Event=null):void {

  stage.quality = "high";

}

private function fl_Deactivate(event:Event):void {

  stage.quality = "low”;

}

Does it work for you Vasco?

Don't hesitate to reach me : etienne at adbuddiz dot com

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 29, 2014 0