Windows Phone 8 (WP8) - Suspend not working

Bugs will be moved here once resolved.

Post » Sun Jan 13, 2013 9:35 pm

I realized the previous project links I provided may not be the easiest type of project to identify the lack of suspend functionality in WP8.

Here are some new links with a simple project that increments a text box score on any click or touch. When you navigate away from the app in WP8 and come back to it, the score will revert back to zero and not maintain its previous value.

NOTE for "thehen": The ShowBugsWin8Phone.zip link has your suggested fix, but unfortunately it does not work.

The Construct 2 project:
https://www.dropbox.com/s/mmql3v0xr4m8y56/ShowBugs.capx

The Windows 8 App export where state is maintained between app switching.
https://www.dropbox.com/s/2rs2i065qpejrul/ShowBugsWin8.zip

The Windows Phone 8 App export where state is NOT maintained between app switching.
https://www.dropbox.com/s/zovqwuo15mgkfwx/ShowBugsWin8Phone.zip

B
6
Posts: 9
Reputation: 645

Post » Sun Jan 13, 2013 9:56 pm

I'm not sure of the problem - it works fine for me here.

With the project you uploaded comment out the MessageBox lines.

In index.html, under 'cr_setSuspended(false);' add 'alert("Activated!")'

You'll then see the alert message when the game is resumed. Spinning speed is the same as when exited.
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783

Post » Mon Jan 14, 2013 12:40 am

Add me on Skype if you still can't get this to work and we'll go through it - hoffmania1
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783

Post » Mon Jan 14, 2013 4:28 am

First off, thanks for spending time to help me with my little problem.

Unfortunately I can't seem to get it working. I tried your suggestions without any luck. Here's a quick video of me exporting a simple project and making the suggested tweaks.

https://www.dropbox.com/s/odm2wq34r0ntjq9/ShowBugs_Construct2_r115_WindowsPhone8_NotSuspending_2013-01-13_2206.zip


Here is the exported solution from the video:
https://www.dropbox.com/s/zovqwuo15mgkfwx/ShowBugsWin8Phone.zip


Here is the Construct 2 project from the video:
https://www.dropbox.com/s/mmql3v0xr4m8y56/ShowBugs.capx


BTW, I tried out your Mortar Melon game, very cool! It's inspiring to see what is possible with Construct 2.
Rob Kachmar2013-01-14 04:32:24
B
6
Posts: 9
Reputation: 645

Post » Mon Jan 14, 2013 9:36 am

Hi Rob,

The version you uploaded works great.

What the video shows is that after quitting the app, you're relaunching it from icon, which by default starts the application from the beginning. If you quit the app and tap the back button, you'll see the activation/deactivation working as expected.

The functionality that you've described and want to achieve is called 'Fast Resume'. You can find more info here: http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj735579(v=vs.105).aspx. To enable fast resume, open up WMAppManifest.xml and add ActivationPolicy="Resume" to the DefaultTask element. E.g.

<DefaultTask Name ="_default" NavigationPage="MainPage.xaml" ActivationPolicy="Resume"/>

It's important to note that you don't have to add this to pass certification.

Thanks for trying out Mortar Melon :D
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783

Post » Mon Jan 14, 2013 4:12 pm

I think suspend and resume should be working correctly in the next beta of C2 (thanks @thehen for help with it). We've also enabled fast resume by default in WP8 exports.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Post » Tue Jan 15, 2013 4:21 am

Thanks for clearing that up @thehen! It works like a charm. I really appreciate you taking the time to help me out. Keep up the great work!
B
6
Posts: 9
Reputation: 645

Post » Fri Mar 29, 2013 11:28 am

Hello thehen

Could you please make a plugin for R119 stable. so that it works.
Great plugin.
And doc on how to use it.
regards MindGear
B
5
G
1
Posts: 31
Reputation: 1,012

Post » Mon Apr 01, 2013 6:55 pm

Closing, since the original bug report issue has been fixed.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Previous

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests