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.

 

Intstructions

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

2. The Debug Mode is a toggle to enable logging of errors in the [F12] Chrome Developer Tools - Console or Safari Web Inspector on USB Debugging.

3. The Auto-Start is a toggle to activate the background feature immediately and be ready for background mode when on background.

4. The property options are straightforward, easy right? I will just reserve this space for future possible features.

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.

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

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

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

  • 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 future shown notifications.

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

    • Text - The text of the notification. 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. Leave empty for default.

  • 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.

    • 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. Leave empty for default.


Quirks :

  • Disable Webview Optimization - Various APIs like playing media or tracking GPS position in background might not work while in background even the background mode is active. To fix such issues the plugin provides a method to disable most optimizations done by Android/CrossWalk.

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".

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

Configuration - The options to set the plugin settings.

  • Debug Mode - If "Enabled", the runtime will log errors. This should be "Disabled" on production.

    • Enabled

    • Disabled

 

  • Auto-Start - If "Enabled", the plugin will activate immediately and be ready for background mode when on background.

    • Enabled

    • Disabled

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 with 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 task list.

  • Background Notification configuration.

  • Notification override customization.

  • 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.

Game 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.

Supporters

Only

 
 
 
 
 

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: