Mobile Background

The Mobile Background add​on implements native mobile background features on both Android and iOS.

Features includes excluding the application from the task list, app go to background or foreground, override the back button, unlock or wake up the app, configure background notifications, override notifications, etc.

The best benefit for this addon is that it supports all editors and runtimes of Construct. Both, Construct 2 and Construct 3.

It will extend the mobile application to allow background features.

Features

The Mobile Background is an addon that extends the game application's feature to implement background features for both android and ios. It's from the Mobile Master Collection under the Construct Master Collection, and supports both Construct 2 and Construct 3, while also supporting both the c2runtime and c3runtime.

Features :

  • Native background features implementation.

  • Native background service features.

  • Go Foreground and Background.

  • Application Wake up and Unlock.

  • Easy to use and no programming required.

  • Well-supported and fully tested.

  • Application exclude from recent tasks list.

  • Background Notification

  • Background Notification configuration.

  • Built-in compatibility tools.

  • Construct 2 editor support.

  • Construct 3 editor support.

  • Construct 2 runtime.

  • Construct 3 runtime.

  • C3 Build Service, PhoneGap.

  • Cordova CLI & Android Studio.

Intstructions

1. The first step is to add the Mobile Background addon into the project.

2. The Debug is a toggle to enable logging of errors in the console, for mobile debugging.

3. The Auto-Start is a toggle to automatically enable the background features.

4. The Run In Background is a toggle to run the Disable Webview Optimizations feature on startup. This will prevent the app from running less frequently in the background.

5. The Run In Full Power is a toggle to run the Disable Battery Optimizations feature on startup. This will prevent the app from sleeping in the background to conserve energy.

6. The Override Back Button is a toggle to run Override Back Button, on startup. This will override the back button to go to the background, instead of closing the app.

7. The Exclude Tasks List is a toggle to run Exclude Tasks List, on startup. This will exclude the app from the recent tasks list, this works on Android 5.0+.

 
 

Actions, Conditions & Expressions

Actions

Core Features :

  • Enable - If Enabled, when the application moves to the background, the mode will activate.

  • Disable - If Disabled, the plugin will deactivate and the application will normally pause on background.

Android Exclusive :

  • Go Background - If on Android, call to move the application to the background.

  • Request Foreground Permission - Starting Android 10.0, apps must request the Draw on Top permission, otherwise the action Go Foreground will silently fail.

  • Go Foreground - If on Android, call to move the application to the foreground.

  • Wake Up - If on Android, call to turn on the screen.

  • Unlock - If on Android, call to move the app to the foreground, even when the device is locked.


Android Exclusive - Notifications :

  • Override Defaults - If on Android, call to customize later shown notifications.

    • Title - The title of the notification. Leave empty for default.

    • Text - The text of the notification. Leave empty for default.

    • Sub Text - Click here for more information. Leave empty for default.

    • Icon - The icon of the notification. This will look for "xxxx.png" in platforms/android/res/drawable|mipmap. Leave empty for default.

    • Color - The color of the notification. In Hex format, for example "F14F4D". On Android 5.0+, the color option will set the background color of the notification circle. Leave empty for default.

    • Resume - If Enabled, the app will come to the foreground when tapping on the notification. Default is Enabled.

    • Hidden - On Android 5.0, if Enabled, the application notification will be hidden from the lockscreen.

    • Big Text - If Enabled, the text will be big in size.

    • Channel Name - Shown when the user views the app's notification settings.

    • Channel Description - Shown when the user views the channel's settings.

    • Allow Close - If Enabled, a close action will be shown with the notification.

    • Close Icon - The icon shown for the close action.

    • Close Title - The text for the close action.

    • Show Duration - If Enabled, it will show the duration since the notification was created. Default is Enabled.

    • Visibility - Android only, click here for more information. Default is Private.

 

  • Silent Defaults - If on Android, call to stop displaying notifications. Be aware that Android recommends adding a notification otherwise the OS may pause the app.

  • Reset Defaults - If on Android, call to reset the notification defaults to its original settings.

  • Configure - If on Android, call to customize the currently shown notifications.

    • Title - The title of the notification. Leave empty for default.

    • Text - The text of the notification. Leave empty for default.

    • Sub Text - Click here for more information. Leave empty for default.

    • Icon - The icon of the notification. This will look for "xxxx.png" in platforms/android/res/drawable|mipmap. Leave empty for default.

    • Color - The color of the notification. In Hex format, for example "F14F4D". On Android 5.0+, the color option will set the background color of the notification circle. Leave empty for default.

    • Resume - If Enabled, the app will come to the foreground when tapping on the notification. Default is Enabled.

    • Hidden - On Android 5.0, if Enabled, the application notification will be hidden from the lockscreen.

    • Big Text - If Enabled, the text will be big in size.

    • Channel Name - Shown when the user views the app's notification settings.

    • Channel Description - Shown when the user views the channel's settings.

    • Allow Close - If Enabled, a close action will be shown with the notification.

    • Close Icon - The icon shown for the close action.

    • Close Title - The text for the close action.

    • Show Duration - If Enabled, it will show the duration since the notification was created. Default is Enabled.

    • Visibility - Android only, click here for more information. Default is Private.


Android Quirks :

  • Disable Webview Optimizations - The app may run less frequently or not at all while in the background, due to the Webview slowing down. Running this after On Activated or checking the property Run In Background, will prevent that.

  • Override Back Button - If on Android, call to override the back button to go to the background instead of closing the app.

  • Exclude Tasks List - If on Android, call to exclude the app from the recent tasks list, this works on Android 5.0+.

  • Disable Battery Optimizations - Starting Android 8.0, apps can be put to sleep to conserve battery, which will kill the background apps. This will ignore the optimizations and allow the app to run in the background.

  • Show Battery Settings - Starting Android 8.0, apps can be put to sleep to conserve battery, which will kill the background apps. Let the user manually choose whether to disable this or keep it enabled.

Conditions

Core Features :

  • Is Active - Checks if the application is on the background while background mode is active.


Android Exclusive :

  • Is Screen Off - Checks if the application is on the background while background mode is active. This works async compared to Is Active.

Android Quirks :

  • Is Ignoring Battery Optimizations - Checks if the battery optimizations are disabled for the application.

Event Triggers :

  • On Enabled - An Event Trigger condition that fires when the Mobile Background is Enabled.

  • On Disabled - An Event Trigger condition that fires when the Mobile Background is Disabled.

  • On Activated - An Event Trigger condition that fires when the Mobile Background is Activated, this is when the application goes into the background while also Enabled.

  • On Deactivated - An Event Trigger condition that fires when the Mobile Background is Deactivated, this is when the application goes into the foreground from the background.

  • On Failed - An Event Trigger condition that fires when the Mobile Background has encountered a Failure achieving background mode.

Expressions

Event Triggers :

  • EventResponse - Returns the response from event triggers. The conditions with green arrows are the event triggers.

Properties

Properties - Full.png

Configuration - The options to set the plugin settings.

  • Debug - If checked, the runtime will log runtime notifications. This should be unchecked on production builds.

  • Auto Start - If checked, the plugin will automatically enable the background features.

  • Android - The options to set the Android features.

  • Run In Background - If checked, it will run Disable Webview Optimizations on startup. This will prevent the app from running less frequently in the background.

  • Run In Full Power - If checked, it will run Disable Battery Optimizations on startup. This will prevent the app from sleeping in the background to conserve energy.

  • Override Back Button - If checked, it will run Override Back Button on startup. This will override the back button to go to the background, instead of closing the app.

  • Exclude Tasks List - If checked, it will run Exclude Tasks List on startup. This will exclude the app from the recent tasks list, this works on Android 5.0+.

 
 

Full Features

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

 

Supporters

Only

Automatic Project

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Get the tools

for your pro games!

Constuct Master Collection - Itch.io
Constuct Master Collection - Discord
Constuct Master Collection - Construct 3

© Construct Master Collection 2020 • All rights reserved

Contact Information: