How do I acquire and release wake lock on phone (c3runtime)?

0 favourites
  • 5 posts
From the Asset Store
The underworld has released another villain who is more menacing than ever before!
  • Hi everyone,

    before I used Construct 2 and I bought the cordova plugins of cranberrygames with which, among other things, I could manage the wake lock of the phone (android) via the powermanagement plugin.

    recently I switched to Construct 3 and I'm forcing myself to use c3runtime (as this should be the future), with various problems and slowdowns.

    the plugin above works with c2runtime, but c3runtime just doesn't see it.

    how can I use acquire and release, of wake lock, with c3runtime? I also like a solution that does not use the cordova plugin.

    I also intend to use the construct apk build of construct 3.

    since I have already written over 80% of my game with c3runtime I don't want to go back to c2runtime.

    how can I do? do you have any ideas?

    thank you all.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • use browser object if you want without plugin.

    acquire for

    window.powermanagement.acquire()

    release for

    window.powermanagement.release()

    P.S:

    you still have to add this plugin to cordova project.

    cordova plugin add cordova-plugin-powermanagement

  • Hey! thank you for the answer! but...

    I don't understand this

    you still have to add this plugin to cordova project.

    cordova plugin add cordova-plugin-powermanagement

    do I have to export the project, modify the config.xml, and then compile with phonegap? can't I make the apk directly via construct 3 builder? (and if so, I did not understand what you mean)

  • can't I make the apk directly via construct 3 builder?

    You probably can't.

  • what a pity! ok, thanks anyway

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