1.0.4 • Published 2 years ago

@glympse-inc/com.glympse.push v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Glympse En Route hybrid push plugin

On iOS, a hybrid client app will need to register for push notifications, and pass these push notifications onto the En Route platform. This plugin facilitates this process.

Usage:

var success = function(data) {
    if ( data.action ) {
        if ( data.action === 'registration' && data.token ) {
            EnRoute.registerDeviceToken(data.type, data.token);
        }
        else if ( data.action === 'notification' && data.payload ) {
            EnRoute.handleRemoteNotification(data.payload);
        }
    }
};

var failure = function(data) {
    console.log("Push notification registration failure");
};

Push.registerForPushNotifications(success, failure);