1
votes

My Windows Phone XNA game calls Guide.BeginShowKeyboardInput to get the user's name. While the Guide's input screen is shown, if the user presses the Home or Search (hardware) buttons, the game is deactivated as usual - but if the user then presses the Back (hardware) button, the game should resume but it doesn't. Instead it shows the "Resuming..." message until Windows Phone gives up trying to resume the game and kills the process.

Please note:

  1. My app is failing Microsoft certification because of this problem - I really need to fix it!
  2. This only happens in my game when the Guide input screen is shown - when it's not shown, the game resumes properly after being deactivated.
  3. This problem only occurs when the game is run on WP7.x (verified problem on WP7.5 and WP7.8) - although the game seems to resume properly on WP8 devices.
  4. I've created a blank XNA game project, called Guide.BeginShowKeyboardInput and tested it using WP7.x devices, and this problem-behavior doesn't occur.
  5. I've tested the game without enabling Music & my Trial License manager (they use timers) and it still does this.
  6. Exact same behavior occurs in the emulator (resume-failure on WP7.x emulators, works fine on WP8 emulator)
  7. I used threads to asynchronously download content during the loading screen - but they already completed and exited. I don't believe other threads are running, although this seems like it could be a thread-blocking issue.

Any other ideas on what could be blocking the game from resuming when the Guide.IsVisible or how to debug/resolve this problem?

2

2 Answers

1
votes

The solution to this issue was simply to NOT use SuppressDraw when dealing with any operation that passes control outside of the app, e.g. Launchers, Choosers and the Guide.

0
votes

Have you tried calling "Guide.EndShowKeyboardInput" in either the Deactivating or closing events?

So that the guide is closed before the app suspends, you do get 10 seconds to suspend so this might be worth looking into. If you want the guide to re-show on resume, then in your state saving code just have a flag and open the guide if it's set.