Mobile Notifications

The Mobile Notifications add​on implements push notifications and local notifications into your mobile application on both Android and iOS, using the Pushwoosh SDK and service.

There are lots of features and tools to use, all the features of the Pushwoosh SDK for push and local notifications are implemented into this addon.

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

It will integrate the native push and local notification features into your mobile application.

 

Intstructions

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

2. The next step is to go to the Properties Bar while the Mobile Notifications object is selected. 

3. Input your Pushwoosh App ID into the App ID field in the configuration section. You can find this from the Pushwoosh Control Panel, on the apllications list, shown for each application.

4. Input your Project ID, which is now the FCM Sender ID. You can get this value from following this guide.

5. Input your MPNS - Service Name. The Microsoft Push Notification Service Name. For Windows support.

6. If you want to log errors into the console during mobile debugging. Set the Debug Mode to Enabled. This is useful for debugging .apks or .ipas.

Reminder:
Ever since the Mobile Notifications SDK Update Compliance with the new Google Requirements. There are now additional steps in supporting the Mobile Notifications, this is a release patch starting Release 6.1

Before this new compliance update, we could build directly without additional configuration, but now we need to do more steps to support notifications, as per required by Google.
The additional configuration setup is shown below.

 

Features

The Mobile Notifications is an addon that integrates the native mobile Pushwoosh SDK into an application made by Construct 2 or Construct 3 with support for both android and ios.
It allows you to implement push and local notifications for your applications.

Features :

  • Full native Android SDK integration.

  • Full native iOS SDK integration.

  • Push and Local Notifications.

  • Notification Customization.

  • Easy to use and no programming required.

  • Well-supported and fully tested.

  • Beacons, Color LED, Sounds,

  • Light screen, Vibration, Modes,

  • Tags, GDPR, General Tools,

  • Remote Tools, Inbox, Messaging,

  • Location, Badges, Launch Notif.

  • Events and Push Notif. History.

  • Construct 2 editor support.

  • Construct 3 editor support.

  • Construct 2 runtime.

  • Construct 3 runtime.

  • C3 Build Service, PhoneGap.

  • Cordova CLI & Android Studio.

 

Additional Configuration

The Mobile Notifications now has a new SDK Compliance setup requirement since the Release 6.1 due to the new Google requirement. It is no longer a one-click build, although we do have a new more popular replacement for those who need the simple one-click build, using the Mobile OneSignal.

Step 1

Whitelist the .pushwoosh.com domain in the config.xml file:

From this:

<access origin="*" />

To this:

<access origin="*" />
<access origin="*.pushwoosh.com" />

Step 2

Get the google-services.json from the Firebase Console as described here. Then, add it to your project.

You just include it at the base/root, inside of the .zip of your exported 
Cordova Project. ( You can unpack and repack it back to .zip )

The next step is to edit the config.xml for it to recognize the new file.

Step 3

Add the following section to your config.xml:

This is how the content of the config.xml would look like.

<platform name="android">
   <resource-file src="google-services.json" target="app/google-services.json" />
   ...
</platform>

This is how the content of the config.xml would look like before. The (...) indicates the properties that are already written there beforehand, you wouldn't want to accidentally remove them.

<platform name="android">
   ...
</platform>

This is how the config.xml would now look like after the changes added.

<platform name="android">
   <resource-file src="google-services.json" target="app/google-services.json" />
   ...
</platform>

The highlighted text is the added property.

Step 4

Then you're done, you can now build it using the C3 Build Service or PhoneGap.

You can also use the Cordova CLI, Android Studio, XCode or Visual Studio.

If you are having issues, consider using the more popular alternative, the Mobile OneSignal addon.

 
 

Pushwoosh Setup

Pushwoosh is the service used by the Mobile Notifications for push notifications. It requires you to setup the Pushwoosh Control Panel for you to take full advantage of all its features.

To get started, create an account. Then, follow this guide.

It's a step-by-step walk-through in using the Pushwoosh Control Panel, for the following:

There are many features to explore with Pushwoosh. I recommend browsing the documentation yourself, and see what interests you. Click here for the documentation directory.

Android Setup

To setup for your Android, you only need to get the Firebase API key and FCM Sender ID from your Firebase Application Console to your Pushwoosh Control Panel > Android Application > Configure.

It's a very easy procedure, click here to see the full setup process (with images).

 

Remember to keep note of the FCM Sender ID, it will be used to input in your Mobile Notifications Sender ID field property.

Review the entire Android Setup documentation too, it contains other implementation setups that you might need that isn't covered by this guide.

iOS Setup

To setup for your iOS, you need to configure pushes on Apple's side. Follow the guide to configure iOS manually or use the Auto Configuration feature.

You might also want to configure the iOS Rich Notifications Integration, the guide covers all the necessary steps to smoothly integrate your application.

Review the entire iOS Setup documentation too, it contains other implementation setups that you might need that isn't covered by this guide.

Android : GCM to FCM Migration

If you have an application that uses the old Pushwoosh from the time when GCM (Google Cloud Messaging) was used instead of FCM (Fire Cloud Messaging), then this migration guide will help you, and don't worry it's very easy to do.

Remember that the you will have to also change the Project ID field from the Mobile Notifications properties with the FCM Sender ID instead of the old Google Project Number.

After that, you're all set.

 

Notification Customization

The Mobile Notifications can be customized, both push notifications and local notifications. If you follow this guide which contains all the information and steps of the notification customization, then you'll have the freedom to make your awesome notification styles.

If your company needs this feature automated, feel free to contact support.

Actions, Conditions & Expressions

Actions

Registration :

  • Register Device - Registers device for push notifications and retreives a push token.

  • UnRegister Device - Registers device for push notifications and retreives a push token.

Device Tags :

  • Plan Tag List - Plan a Tag List for the Device.

    • Tag - The tag name.

    • Values - The values of the tag. Separate each value with a comma (",").

  • Plan Tag - Plan a Tag for the Device.

    • Tag - The tag name.

    • Values - The values of the tag. Either a string or a number value.

  • Plan Tag Boolean - Plan a Tag Boolean for the Device.

    • Tag - The tag name.

    • Value - Set the value as "True" or "False".

  • Set Tags - Sets tags for the device.

  • Get Tags - Requst to "Get Tags" for the device.


Location Tracking :

  • Start Tracking - Starts geolocation-based push notifications. Geozones are configured in Pushwoosh Control panel.

  • Stop Tracking - Stops geolocation-based push notifications.


Get Status :

  • Get Remote Status - Returns detailed status of push notification permissions.


Mobile Badge :

  • Set Badge Count - Sets the application icon badge number.

    • Value - The amount of value to set to the badge count.

  • Add Badge Count - Adds value to the application icon badge.

    • Value - The amount of value to add to the badge count.

  • Subtract Badge Count - Subtracts value from the application icon badge.

    • Value - The amount of value to subtract from the badge count.


Notifications :

  • Get Launch Notification - Returns detailed status of push notification permissions.

  • Clear Launch Notification - Clears launch notification, "Get Launch Notification" will return empty after this call.


General :

  • Set UserID - Sets User indentifier. This allows data and events to be matched across multiple user devices.

    • UserID - The UserID identifier. The Facebook ID, Username, Email, or any other user ID.

  • Set Communication - A binary method enabling/disabling all communication with Pushwoosh. "Disabled" unsubscribes the device from receiving push notifications and stops in-app messages download. While "Enabled" reverses the effect.

    • Toggle - Set "Enabled" or "Disabled".

  • Remove All Device Data - Removes all data about the device.


Post Event :

  • Plan Event Attribute - Plan to add an attribute for the next "Post Event".

    • Name - The name of the attribute.

    • Value - The value of the attribute.

  • Post Event - Posts events for In-App Messages. This can trigger an In-App message display as specified in the Pushwoosh Control Panel.

    • Name - The name of the event to trigger.


Local Notifications :

  • Plan User Data - Plan to add a "User Data" for the next "Create Local Notification". The additional data to pass in the local notification.

    • Name - The name of the user data.

    • Value - The value of the user data.

  • Create Local Notification - Schedules a local notification.

    • Message - The notification message.

    • Seconds - The notification delay in seconds.

 

  • Clear Local Notifications - Clears all pending local notifications created by "Create Local Notification". Android Only.

  • Clear Notification Center - Clears all notifications presented in Android Notification Center. Android Only.

  • Cancel All Local Notifications - Clears all local notifications from the notification center. IOS Only.

Beacons :

  • Start Beacon Pushes - Starts beacon tracking. Android Only.

  • Stop Beacon Pushes - Stop beacon tracking. Android Only.

  • Set Beacon Background Mode - Informs plugin that app went to background mode (or vise versa). Android Only.

    • Toggle - Set "Enabled" or "Disabled".


Customizations :

  • Set Notification Mode - Allows multiple or only singular notifications to be displayed in the Android Notification Center. Android Only.

    • Toggle - Set to "Multiple" or "Singular".

  • Set Sound Type - Sets default sound for incoming pushes. Android Only.

    • Type - Set to "Default", "No Sound" or "Always".

  • Set Vibration Type - Sets vibration mode for incoming pushes. Android Only.

    • Type - Set to "Default", "No Vibration" or "Always".

  • Set Light Screen - Turns screen "On" or "Off" when notification arrives. Android Only.

    • Toggle - Set "On" or "Off". Off by default.

  • Set Enable LED - Enables or Disables led blinking when notification arrives and display is off. Android Only.

    • Toggle - Set "On" or "Off". Off by default.

  • Set Color LED - Sets LED color. Use with "Set Enable LED". Android Only.

    • Alpha - The Alpha (A) of the LED color in ARGB integer format.

    • Red - The Red (R) of the LED color in ARGB integer format.

    • Green - The Green (G) of the LED color in ARGB integer format.

    • Blue - The Blue (B) of the LED color in ARGB integer format.


Push Notifications :

  • Get Push History - Request to get the list of received push notifications. Android Only.

  • Clear Push History - Clears the Push History. Android Only.


Inbox :

  • Present Inbox UI - Opens the Inbox screen.


GDPR :

  • Show Consent UI - A part of The GDPR Compliance solution that shows the GDPR Consent Form, ensuring lawful basis for processing personal data of EU citizens.

  • Show Deletion UI - A part of The GDPR Compliance solution that shows the GDPR Deletion Form, ensuring means to comply with the right to erasure.

Conditions

Registration :

  • On Register Device - Triggers when the "Register Device" has succeeded.

  • On Register Device Failed - Triggers when the "Register Device" has failed.

  • On UnRegister Device - Triggers when the "UnRegister Device" has succeeded.

  • On UnRegister Device Failed - Triggers when the "UnRegister Device" has failed.

Device Tags :

  • On Set Tags - Triggers when the "Set Tags" has succeeded.

  • On Set Tags Failed - Triggers when the "Set Tags" has failed.

  • On Get Tags - Triggers when the "Get Tags" has succeeded.

  • On Get Tags Failed - Triggers when the "Get Tags" has failed.


Location Tracking :

  • On Start Tracking - Triggers when the "Start Tracking" has succeeded.

  • On Start Tracking Failed - Triggers when the "Start Tracking" has failed.

  • On Stop Tracking - Triggers when the "Stop Tracking" has succeeded.

  • On Stop Tracking Failed - Triggers when the "Stop Tracking" has failed.


Get Status :

  • On Get Remote Status - Triggers when the "Get Remote Status" has succeeded.

  • On Get Remote Status Failed - Triggers when the "Get Remote Status" has failed.

  • Is Enabled - Checks the status "Is Enabled" from the recent "Get Remote Status".

  • Has Push Badge - Checks the status "Has Push Badge" from the recent "Get Remote Status".

  • Has Push Alert - Checks the status "Has Push Alert" from the recent "Get Remote Status".

  • Has Push Sound - Checks the status "Has Push Sound" from the recent "Get Remote Status".


Notifications :

  • On Get Launch - Triggers when the "Get Launch Notification" has been invoked.

  • On Clear Launch - Triggers when the "Clear Launch Notification" has been invoked.


General :

  • On Set Communication - Triggers when the "Set Communication" has succeeded.

  • On Set Communication Failed - Triggers when the "Set Communication" has failed.


Local Notifications :

  • On Create Notification - Triggers when the "Create Local Notification" has succeeded.

  • On Create Notification Failed - Triggers when the "Create Local Notification" has failed.

  • On Cancel All - Triggers when the "Cancel All Local Notifications" has been invoked.


Beacons :

  • On Start Beacon - Triggers when the "Start Beacon Pushes" has succeeded.

  • On Start Beacon Failed - Triggers when the "Start Beacon Pushes" has failed.

  • On Stop Beacon - Triggers when the "Stop Beacon Pushes" has succeeded.

  • On Stop Beacon Failed - Triggers when the "Stop Beacon Pushes" has failed.

  • On Set Background Mode - Triggers when the "Set Beacon Background Mode" has succeeded.

  • On Set Background Mode Failed - Triggers when the "Set Beacon Background Mode" has failed.


Customizations :

  • On Set Multiple - Triggers when the "Set Notification Mode" to "Multiple" has succeeded.

  • On Set Multiple Failed - Triggers when the "Set Notification Mode" to "Multiple" has failed.

  • On Set Singular - Triggers when the "Set Notification Mode" to "Singular" has succeeded.

  • On Set Singular Failed - Triggers when the "Set Notification Mode" to "Singular" has failed.

  • On Set Sound Type - Triggers when the "Set Sound Type" has succeeded.

  • On Set Sound Type Failed - Triggers when the "Set Sound Type" has failed.

  • On Set Vibration Type - Triggers when the "Set Vibration Type" has succeeded.

  • On Set Vibration Type Failed - Triggers when the "Set Vibration Type" has failed.

  • On Set Light Screen - Triggers when the "Set Light Screen" has succeeded.

  • On Set Light Screen Failed - Triggers when the "Set Light Screen" has failed.

  • On Set Enable LED - Triggers when the "Set Enable LED" has succeeded.

  • On Set Enable LED Failed - Triggers when the "Set Enable LED" has failed.

  • On Set Color LED - Triggers when the "Set Color LED" has succeeded.

  • On Set Color LED Failed - Triggers when the "Set Color LED" has failed.


Push Notifications :

  • On Get Push History - Triggers when the "Get Push History" has been invoked.


Listeners :

  • On Received Notification - Triggers when the a new push notification is received.

  • On Tap Notification - Triggers when the a push notification is tapped.

Debugging :

  • On Error - Triggers when the an error happens.

Expressions

Registration :

  • RetPushToken - Returns the Push Token after Push Notification device registration.


Device Tags :

  • GetTags - Returns the JSON string of the device tags. This is if "Get Tags" is successful "On Get Tags".


Mobile Badge :

  • GetBadgeCount - Returns the application icon badge number.

Notifications :

  • GetPayload - Returns the push notification payload if the app was started in response to a push notification, or empty.


Push Notifications :

  • GetPushHistory - Returns the JSON string of the history list of push notifications.


Debugging :

  • GetErrorMessage - Returns the error message when the condition "On Error" triggers.


Get Data :

  • GetPushToken - Returns the push token if it is available.

  • GetHWID - Returns the PushWoosh Hardware ID (HWID) used for communications with Pushwoosh API.


Listeners : Receive or Tap :

  • GetMessage - Returns the push notification message.

  • GetUserData - Returns the JSON string of the object or array of the push notification custom data.

  • GetOnStart - Returns "True" or "False" to check if it is a launch notification.

  • GetForeground - Returns "True" or "False" to check if the notification is received in foreground.

  • GetAndroidData - Returns the JSON string of the Android specific notification payload.

  • GetIOSData - Returns the JSON string of the IOS specific notification payload.

  • GetWindows8Data - Returns the JSON string of the Windows Phone specific notification payload.

  • GetWindowsData - Returns the JSON string of the Windows specific notification payload.

Properties

Configuration - The Configuration input for the PushWoosh plugin.

  • App ID - The PushWoosh App ID.


Android - The Configuration input for the Android platform.

  • Project ID - The Google Project Number.


Windows - The Configuration input for the Windows platform.

  • Service Name - The Microsoft Push Notification Service (MPNS) name.

 

Universal - General Plugin Properties.

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

    • Enabled

    • Disabled

 
 

Feature Showcase

The Mobile Notifications is an addon that integrates the native mobile Pushwoosh SDK into an application made by Construct 2 or Construct 3 with support for both android and ios.
It allows you to implement push and local notifications for your applications.

 

Mobile OneSignal

The Mobile Notifications addon implements native mobile push notifications, local notifications, in-app messaging, mobile badges and other notification features using the Pushwoosh service.
Although, we also support the popular and user-friendly 
OneSignal service.

 

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: