INSTALLATION
1. Install the component from Forge into your environment.
2. Add a dependency from your mobile app to the PushwooshPlugin module and place the PushwooshNotifications block on your main screen, setting your Pushwoosh Application Code.
3. Android push requires your Firebase configuration: compress google-services.json into google-services.zip and upload it as a resource of your application module with Deploy Action = "Deploy to Target Directory". For Huawei devices, do the same with agconnect-services.json (agconnect-services.zip).
4. Generate a new native build after installing or updating the plugin.
CONFIGURATION
Recommended: set your Application Code at build time by adding a preference to the Extensibility Configurations of your application:
{ "preferences": { "global": [ { "name": "PW_APPID", "value": "XXXXX-XXXXX" } ] } }
With this, the SDK is configured before JavaScript runs: pushes delivered while the app is not running are handled correctly and open statistics are collected. Preference names are case-sensitive. The Device API token can be provided the same way (PW_API_TOKEN) or via the SetApiToken client action.
USAGE
Call client actions after the PushwooshNotifications block fires OnInitializeOver: RegisterDevice, SetTags / GetTags, SetUserId, PostEvent, inbox actions (LoadMessages, ReadMessage and others), SetMultiNotificationMode (Android: notifications stack instead of replacing each other), GetDiagnostics (returns the integration state as JSON — attach it to support tickets).
Server actions SendPushNotificationToAll / ToToken / ToUserId support Inbox parameters (InboxDays, InboxDate, InboxImage).
Support: https://help.pushwoosh.com
Documentation: https://docs.pushwoosh.com
How to use this plugin?
To receive notifications, you start by using the plugin to register the device in Pushwoosh. Pushwoosh registers the device in the Apple Push Notification Service (APNS) and in Firebase Cloud Messaging (FCM).
Once the devices are registered, you can use the plugin to broadcast a message or send a message targeted to specific users. The plugin sends the message via Pushwoosh which in turn contacts the appropriate messaging service. It is then up to APNS or FCM to deliver the message to the device.
For a more detailed explanation follow this step-by-step tutorial.