Mobile Sleep

The Mobile Sleep plugin is specifically designed to implement native power management features in both Android and iOS, for games built using Construct 3 and Construct 2.


The Mobile Sleep plugin is essential for games that require the mobile device to always use its highest performance, benefiting intense games that require the most resources.


The Mobile Sleep plugin allows the device to keep the device awake or dimmed, and other features.

PlayFab API v2.png

Introduction

Step 1.png

The Construct Master Collection supports the full and easy integration of native mobile Android SDKs and iOS SDKs for both Construct 3 and Construct 2.


Please click here to learn more about Mobile.

Features


The Mobile Sleep plugin is specifically designed to implement native power management features in both Android and iOS, for games built using Construct 3 and Construct 2.


The Mobile Sleep plugin is essential for games that require the mobile device to always use its highest performance, benefiting intense games that require the most resources.


The Mobile Sleep plugin allows the device to keep the device awake or dimmed, and other features.


Here are some of the native features of the mobile plugin:

  • Android Power Management

  • iOS Power Management

  • Lock awake application

  • Lock dim application

  • Release lock awake or dim

  • Release pause sleep

  • Prevent device from dimming while application is active.

  • Prevent device from sleeping while application is active.

  • Allow device to use maximum performance for application.

  • Prevent device from using power saving features slowing the application.

For more information about native mobile or Android and iOS features, please click here to learn the introductory lessons to Mobile.


Platform Integration


Here are some of the platforms that are natively supported:

  • Android

  • iOS

  • Native Android

  • Native iOS


Build Support


Here are some of the supported build options:


Editor Features


Here are some of the features in the Construct editor:

  • Construct 3

  • Construct 2

 
 

How to use?

It is easy to use the Mobile Sleep plugin, you will only need to follow the steps below.

1. The first step is to add the Mobile Sleep object into the project.


 
 

Documentation

There is currently nothing to show, we will add more in the future.



Performance Optimization


The Mobile Sleep plugin has the capability to force the device to use all of its resources to run the application or game application, preventing any slowdowns from power saving features from mobile device manufacturers for hybrid applications, which Construct 3 and Construct 2 export to with Cordova. This will in turn significantly improve and maintain overall performance for mobile game applications made in Construct 3 and Construct 2, preventing lag spikes and sudden slowdowns.



There are many ways to handle the power management features. For the simplest implementation, you can either activate lock awake app on start of the game application, or you can dynamically activate or deactivate the lock awake app. For example, you can choose to only activate lock awake app during gameplay, but deactivate when in the main menu.

 

Actions, Conditions & Expressions

Actions

press to zoom

press to zoom
1/1

The following action groups:

  • General

General

  • Lock Awake App - Lock the App to an awake state when idle. This is useful during in-game.

  • Lock Dim App - Lock the App to a dimmed state when idle. This is important to at least keep the phone awake.

  • Release Lock - Release any app state lock if Locked Awake or Locked Dimmed. To avoid unnecessary battery drain.

  • Release Pause Sleep - By default, the wake lock is auto-released when paused (Phone is off or the app is minimized). It will reacquire the wake-lock upon app resume. To disable, set to "False".

  • Toggle - Set either "True" or "False".

Conditions

The following condition groups:

  • Lock Awake

  • Lock Dimmed

  • Lock Release

  • Override Pause Sleep

press to zoom

press to zoom
1/1

Lock Awake

  • On Lock Awake - Triggered when the lock awake executed successfully.

  • On Lock Awake Failed - Triggered when the lock awake failed to execute.



Lock Dimmed

  • On Lock Dimmed - Triggered when the lock dimmed executed successfully.

  • On Lock Dimmed Failed - Triggered when the lock dimmed failed to execute.


Lock Release

  • On Lock Release - Triggered when the lock release executed successfully.

  • On Lock Release Failed - Triggered when the lock release failed to execute.


Override Pause Sleep

  • On Pause Release - Triggered when the pause sleep release executed successfully.

  • On Pause Release Failed - Triggered when the pause sleep release failed to execute.

Expressions

1/0

Object   Properties

Plugin Properties

1/0
 
 

Showcase

There is currently nothing to show, we will add more in the future.

 

Game Projects 

Instructions Kit

Construct 3 Project
Construct 3 Project

press to zoom
Construct 2 Project
Construct 2 Project

press to zoom
Construct 3 Project
Construct 3 Project

press to zoom
1/2

Specifications

  • Instructions - The game project contains instructions and steps on how to use the addon and its features.

  • Action, Conditions and Expressions - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks on the recommended ways of using the addon.

Supporters

Only