[Android] Game is not paused on Hold/Standby mode.

Get help using Construct 2

Post » Mon May 27, 2013 4:10 pm

Hi C2 Developers, i have a problem with exported game for Android using CocoonJS by @ludei

My Problem:
Game is not paused when my Android device on Hold/Standby Mode.

Here is the video demo: (tested on Samsung Galaxy S4)
http://www.youtube.com/watch?v=9iRXcDbJ81E

Expected Result:
The application should be paused on Hold/Standby mode.

How must i do to fix this?
Is there any condition for Hold/Standby mode on mobile device (Android)?

Thanks for your reply :)

kenli2013-05-27 16:10:55
Enlik Tjioe
Hobbyist Game Developer
Technology, Travelling, and Video Games Enthusiast
www.enliktjioe.com
B
46
S
11
G
6
Posts: 176
Reputation: 7,323

Post » Mon May 27, 2013 5:53 pm

Did you add Browser plugin, an event "On Suspended" ?
B
111
S
30
G
28
Posts: 3,106
Reputation: 27,643

Post » Tue May 28, 2013 11:21 am

[QUOTE=Joannesalfa] Did you add Browser plugin, an event "On Suspended" ?[/QUOTE]

Yes @Joannesalfa, i've added the Browser plugin with "On Suspended" event.


It works on Desktop browser and Android browser (tested on Chrome, Firefox Beta, Opera).

But when i'm compiled it with CocoonJS and make it native games (.APK), the game is not paused when my Android device in hold mode, and this plugin event "On Suspended" is not work as usual.kenli2013-05-28 11:22:19
Enlik Tjioe
Hobbyist Game Developer
Technology, Travelling, and Video Games Enthusiast
www.enliktjioe.com
B
46
S
11
G
6
Posts: 176
Reputation: 7,323

Post » Tue May 28, 2013 11:48 am

It's Ludei's problem, you should report to Ludei's team.
B
111
S
30
G
28
Posts: 3,106
Reputation: 27,643

Post » Tue May 28, 2013 1:46 pm

@kenli
it might have to do with cocoonjs wakelock issue.

I have been told they are fixing this in release 1.4 which should be out soon
B
37
S
15
G
8
Posts: 453
Reputation: 7,894

Post » Tue May 28, 2013 1:59 pm

Construct 2 automatically pauses the game (or it should do anyway) when it goes in to the background. We listen to CocoonJS's suspend and resume events and handle them accordingly. It looks like CocoonJS isn't calling the suspend and resume events appropriately, so you should probably contact Ludei about the issue.
Scirra Founder
B
373
S
218
G
84
Posts: 23,449
Reputation: 186,128

Post » Tue May 28, 2013 6:18 pm

Thanks @Joannesalfa @humanescape @Ashely for your reply, i'll contact @ludei now.

Hopefully this problem solved and i'll share it here :)
Enlik Tjioe
Hobbyist Game Developer
Technology, Travelling, and Video Games Enthusiast
www.enliktjioe.com
B
46
S
11
G
6
Posts: 176
Reputation: 7,323


Return to How do I....?

Who is online

Users browsing this forum: chrisinfinger, dcadjust, Draconiz717, gumshoe2029, Magistross, Wolverlink and 7 guests