Game not suspending on Android

0 favourites
  • 7 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hello,

    If I export a game to phonegap and install it on my Samsung S3 running Android 2.3.6, the Android task manager shows that the game is still using cpu and consuming memory.

    I verified this by exporting the Space Blaster game that is included in the examples folder of Construct 2 108.2 64 edition.

    I also tried debug and release builds for Android.



  • How much CPU is it using exactly? And it's a non-issue if it still uses memory because it's still there for when you switch back to it.

    Try adding some text to a text object in the Browser object's 'on suspended' and 'on resumed' events. This will indicate if it's working properly, and I suspect it actually is, since double-checking our source code indicates we do handle these events.

  • Hi Ashley,

    I started the game by pressing 'touch to begin' and cpu usage has settled to around 50% (but it fluctuates 30% - 49%).

    When I say that it is consuming memory I mean its actively consuming memory over time, if I leave it for a 10 minutes when I go back to the game I get a black screen, and have to force the app to close before I can use it again. However if I switch to another app and go back immediately, the game starts again i.e. it doesn't suspend, it exits.

    I wish I had another android device to test this on, I have to assume its an issue with my particular hardware/software, otherwise I would expect to see other people reporting the same issue, as it is quite an obvious problem.


  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Gez - I tested it on my Android phone and it doesn't get stuck in the background, it simply exits when I press the Home button and never pauses and resumes. I'm not sure if it's a PhoneGap bug, it's hard to tell - I'm in touch with PhoneGap about it.

  • Gez try to logcat it. On your device. There is an logcat app also try to install it click record then start the space blaster game etc... save it and check the log files then.

  • Hello, Happy new year!

    I used the logcat app as you suggested, here is the log:

    I don't really understand it but I did notice this:


    D/CordovaLog(16597): Uncaught TypeError: Property 'nb' of object [object DOMWindow] is not a function

    D/CordovaLog(16597): file:///android_asset/www/c2runtime.js: Line 73 : Uncaught TypeError: Property 'nb' of object [object DOMWindow] is not a function



  • Gez - can you try that again but disable minify on export? The minification has garbled the error message and made it useless.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)