Firebase Remote Config

The Firebase Remote Config implements firebase remote config for Android.
It achieves that through fetching, activating and retrieving Firebase Cloud Config data into your application.

It lets you change the behavior and appearance of your app without requiring users to download an app update.

It supports Construct 3 and is designed to be optimal and efficient for games with c3runtime, designed for Android.

It also has built-in JavaScript support.

 

Intstructions

Desktop.png

1. The first step is to add the Remote Config addon into the project.

2. This addon now supports the C3 Build Service.
Kindly click here for the tutorial.

3. If the Debug Mode property is checked, it will log information and errors in the console. Set this unchecked for your production release.

[This is currently disabled, reserved for future use.]


4. The Android Version input allows you to manually specify the Android Firebase Analytics SDK version.
Kindly
click here to check out the available versions.
Always try and test before publishing with a new version, to check for compatibility.

  • iOS platform is not yet supported.If your company needs this feature, feel free to contact us.

Features

The Firebase Remote Config is an addon that integrates the native mobile Firebase Remote Config SDK into an application made in Construct 3, with support for android.

It implements firebase remote config for Android through fetching, activating and retrieving Firebase Cloud Config data into your application.

The iOS platform is not yet supported. If your company needs this feature, feel free to contact us.

Features :

  • Full native Android SDK integration.

  • Fetch Firebase config data.

  • Activate Firebase config data.

  • Retrieve Firebase config data.

  • Easy to use and no programming required.

  • Well-supported and fully tested.

  • C3 Scripting (JavaScript) support.

  • Get String data

  • Get Number data

  • Get Boolean data

  • Get Byte data

  • Construct 3 editor support.

  • Construct 3 runtime.

  • Worker Mode support.

  • C3 Build Service

  • Android Studio

  • Cordova CLI

Integration Tutorial

Google Play Services

  • To use Firebase Analytics, it requires the googles-services.json (android).

  • And, GoogleService-Info.plist (iOS).

  • You can get these files from the Firebase Console.

  • Import the files in the Files folder of your Construct 3 project.

  • Congratulations, you have now successfully integrated Google Services for Firebase Analytics, in your application.

AdSupport Framework (iOS)

  • In order to collect demographic, age, gender data, etc., you should additionally include the AdSupport.framework into your project.

Actions, Conditions & Expressions

Actions

Actions.png

General :

  • Fetch - Starts fetching configs, adhering to the specified minimum fetch interval of 1 hour.

    • Hours - Interval, with a minimum of 1 hour.

​​

  • Activate - Asynchronously activates the most recently fetched configs, so that the fetched key value pairs take effect.​

  • Fetch Activate - Asynchronously fetches and then activates the fetched configs.

 


Get :

  • Get Value - Get parameter values from the Remote Config object.

    • Key - The parameter key.

    • Type - The data type of the value.

    • Tag - The tag to differentiate requests.

Conditions

General :

  • Is Initialized - Check if Firebase Remote Config has initialized.

  • On Fetch - Trigger fires after a successful fetch.

  • On Activate - Trigger fires after a successful activation.

Conditions.png
  • On Fetch-Activate - Trigger fires after a successful fetch-activate.

  • On Fetch Fail - Trigger fires after a fetch failure.

  • On Activate Fail - Trigger fires after an activation failure.

  • On Fetch-Activate Fail - Trigger fires after a fetch-activate failure.

Get :

  • On Get Value - Trigger fires upon completion of the get value request.

    • Type - The data type of the value.

    • Tag - The tag to differentiate requests.

  • On Any Get - Trigger fires upon any completion of a get value request.

Expressions

Expressions.png

Get :

  • GetBoolean - Returns 1 for (true) or 0 for (false).

  • GetString - Returns the string value.

  • GetNumber - Returns the number value.

  • GetByte - Returns the byte value, from ArrayBuffer to Base64 string.

  • Tag - Return the tag to differentiate requests.

  • Key - Return the current parameter key.

  • Type - Return the current parameter type. ('boolean', 'string', 'number' or 'byte')

Feature Tutorial

Using the Firebase Remote Config in Construct 3 is straightforward using this addon.

The only requirements are a Firebase account with an Android application, parameters declared in the Firebase Remote Config console, which will be retrieved by your Android application. And finally, matching the app id.


Kindly follow the steps below for the feature integration process walkthrough.

Console.png

The first step is making a Firebase account, with an Android application.

Then, include the values you want your Construct 3 application to fetch, activate and retrieve.

Step 2 - Application ID

The second step is to match the application id of your Construct 3 mobile android application with the one in the Firebase Console.
This is the basis for the synchronization.

Step 1.png

Step 3  - Retrieving Configs

Get.png

The third and final step is to retrieve the configurations data.

This is assuming you have already followed the build integration tutorial.

You can now get the config data by its data type.


Congratulations!
You now know how to integrate the Firebase Remote Config into your mobile application.

Tutorial Project

Sample Setup Project

Construct 3 Project
Construct 3 Project

press to zoom
Construct 3 Project
Construct 3 Project

press to zoom
1/1

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

Step 1 - Firebase