Trigger.io

How to integrate Pushwoosh SDK into your Trigger.io project

Supports iOS, Android

Download Module
Download Sample
Module API Docs

  1. Add Pushwoosh module to your app according to the Configuration for your Modules article on Trigger.io.

  2. Set up push notifications handler:

forge.internal.addEventListener("pushwoosh.pushReceived",
    function (notification) {
            alert('push received: ' + notification);
    }
);
  1. Set up push registration handler:
forge.internal.addEventListener("pushwoosh.registrationSuccess",
    function (status) {
            log('registered with token: ' + status['deviceToken']);
    }
);
  1. Call “onDeviceReady” method (make sure you call this method each time the app starts):

Replace ENTER_PUSHWOOSH_APP_ID with your real Pushwoosh App ID and for Android replace ENTER_GOOGLE_PROJECT_NUMBER with your Google Project Number

forge.pushwoosh.onDeviceReady({"pw_appid":"ENTER_PUSHWOOSH_APP_ID", "gcm_id":"ENTER_GOOGLE_PROJECT_NUMBER"});
  1. Register for push notifications:
forge.pushwoosh.registerDevice();

That’s it!

Trigger.io

How to integrate Pushwoosh SDK into your Trigger.io project