WebPopup bug (case #8514, FIXED)

It’s better shown then described, so here is a short YouTube video:
http://www.youtube.com/watch?v=bksHwU7yQkc

In a nutshell:

When the WebPopup is visible and you go to OpenFeint leaderboards, then go back to the game, the status bar space isn’t reclaimed, although the status bar itself disappears. If you now exit the app via native.requestExit(), a force close message will appear shortly after.

The phone used is HTC Desire running Android 2.3.3 [import]uid: 52103 topic_id: 15717 reply_id: 315717[/import]

Looks like this has nothing to do with OpenFeint.

As the status bar area also remains black (and game screen shifted) when I turn off the screen, then unlock the phone, going back to the game.
This probably happens in a number of different scenarios too. [import]uid: 52103 topic_id: 15717 reply_id: 58214[/import]

Hello Vitaly,

I’m guessing that the ad banner that you are showing at the top of the screen is a web popup, correct?

It looks like we need to have Corona force a repaint when returning from another activity. In the meantime, you may be able to work-around this now. When your app displays OpenFeint, your app will receive a “suspended” event. When you back out of OpenFeint, you will receive a “resumed” event. When you receive that resume event, I recommend that you do a native.cancelWebPopup() and then reshow your web popup. This will force the popup to repaint itself. You can find an example on how to receive suspended/resumed event from the Corona SDK’s “Hardware\SystemEvents” sample app.

Regarding the crash, that was caused by the web popup and it was fixed this week. [import]uid: 32256 topic_id: 15717 reply_id: 59131[/import]

Thanks Joshua! You are correct, that is a web popup. I’ll try your solution.

I was about to submit a bug report with some test code. Well, here is an example app anyways, maybe it will assist you with testing:
http://dl.dropbox.com/u/2776279/popup_test.zip
To reproduce the bug:

  1. launch the app - the web popup will show up at the top
  2. turn off the screen
  3. unlock the screen going back to the app - the status bar will slide away, but the app’s canvas may not slide up a little to reclaim the empty space. [import]uid: 52103 topic_id: 15717 reply_id: 59146[/import]

@Joshua

When your app displays OpenFeint, your app will receive a “suspended” event. When you back out of OpenFeint, you will receive a “resumed” event.

Is this only for android or will it also work for iOS?

I was looking for a way the detect if the OF dialog is on screen or closed, that sounded like it might fit the bill… [import]uid: 10478 topic_id: 15717 reply_id: 59149[/import]

PixelEnvision,

The suspend/resume behavior with OpenFeint only happens on Android. iOS does not suspend when displaying the OpenFeint window. It’s an unfortunate behavior difference that I don’t think we can work-around. [import]uid: 32256 topic_id: 15717 reply_id: 59151[/import]

Vitaly,

Thanks for the info. Would you mind reporting this as a bug anyways? This way it’ll get in my queue and not be forgotten. You can report the issue via the “Report a Bug” link at the top of this page. Thanks! [import]uid: 32256 topic_id: 15717 reply_id: 59152[/import]

@Joshua

Bummer :slight_smile:

But thanks for the info… [import]uid: 10478 topic_id: 15717 reply_id: 59168[/import]

Joshua,

OK, I have submitted a bug report.
Unfortunately, hiding then showing web popup doesn’t help.

In my app I hide the ad before going to the About window and show it again, when player returns to the main menu, but the black area does not disappear.

[import]uid: 52103 topic_id: 15717 reply_id: 59369[/import]

Got it. Thanks!
I’ll look into this issue in the next few days. [import]uid: 32256 topic_id: 15717 reply_id: 59394[/import]

Hello Vitaly,

This turned out to be an Android layout bug that only seemed to happen on 1 out of 4 Android devices that I have. Luckily, I’ve found a work-around. The fix will be made available in the next daily build. [import]uid: 32256 topic_id: 15717 reply_id: 59804[/import]

Hello Joshua,

I’m looking forward to it! Now that all there web popup related bugs are fixed, integrating AdMob is finally a viable option. Thank you! [import]uid: 52103 topic_id: 15717 reply_id: 59856[/import]