PubNub's Mobile Push Gateway feature enables developers to bridge native PubNub publishing with 3rd-party push notification services including Google Android GCM (Google Cloud Messaging)/FCM (Firebase Cloud Messaging), Apple iOS APNS (Apple Push Notification Service), and Microsoft Windows Phone MPNS (Microsoft Push Notification Service).
By using the Mobile Push Gateway, developers can eliminate the need for developing, configuring, and maintaining additional server-side components for 3rd-party push notification providers.
Learn more about our Mobile Push Gateway here.
Enable push notifications on provided set of channels.
To run Adding Device to Channel
you can use the following method(s) in the Titanium V4 SDK
pubnub.push.addChannels(
{
channels: ['my_chat'],
device: 'A655FBA9931AB',
pushGateway: 'apns' // apns, gcm, mpns
},
function(status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!")
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
Request for all channels on which push notification has been enabled using specified pushToken.
To run Listing Channels For Device
you can use the following method(s) in the Titanium V4 SDK
pubnub.push.listChannels(
{
device: 'A655FBA9931AB',
pushGateway: 'apns' // apns, gcm, mpns
},
function (status, response) {
if (status.error) {
console.log("operation failed w/ error:", status);
return;
}
console.log("listing push channel for device");
response.channels.forEach( function (channel) {
console.log(channel);
});
}
);
// Example of status
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
// Example of response
{
channels: [ 'a', 'b' ]
}
Disable push notifications on provided set of channels.
To run Removing Device From Channel
you can use the following method(s) in the Titanium V4 SDK
pubnub.push.removeChannels(
{
channels: ['my_chat'],
device: 'A655FBA9931AB',
pushGateway: 'apns' // apns, gcm, mpns
},
function(status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!");
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
Disable push notifications from all channels which is registered with specified pushToken.
To run Remove all push notifications
you can use the following method(s) in the Titanium V4 SDK
pubnub.push.deleteDevice(
{
device: 'A655FBA9931AB',
pushGateway: 'apns' // apns, gcm, mpns
},
function (status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!");
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
PubNub's Mobile Push Gateway feature enables developers to bridge native PubNub publishing with 3rd-party push notification services including Google Android GCM (Google Cloud Messaging)/FCM (Firebase Cloud Messaging), Apple iOS APNS (Apple Push Notification Service), and Microsoft Windows Phone MPNS (Microsoft Push Notification Service).
By using the Mobile Push Gateway, developers can eliminate the need for developing, configuring, and maintaining additional server-side components for 3rd-party push notification providers.
Learn more about our Mobile Push Gateway here.
Enable push notifications on provided set of channels.
To run Adding Device to Channel
you can use the following method(s) in the Node.js V4 SDK
pubnub.push.addChannels(
{
channels: ['a', 'b'],
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function(status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!")
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
Request for all channels on which push notification has been enabled using specified pushToken.
To run Listing Channels For Device
you can use the following method(s) in the Node.js V4 SDK
pubnub.push.listChannels(
{
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function (status, response) {
if (status.error) {
console.log("operation failed w/ error:", status);
return;
}
console.log("listing push channel for device")
response.channels.forEach( function (channel) {
console.log(channel)
})
}
);
// Example of status
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
// Example of response
{
channels: [ 'a', 'b' ]
}
Disable push notifications on provided set of channels.
To run Removing Device From Channel
you can use the following method(s) in the Node.js V4 SDK
pubnub.push.removeChannels(
{
channels: ['a', 'b'],
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function(status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!")
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
Disable push notifications from all channels which is registered with specified pushToken.
To run Remove all push notifications
you can use the following method(s) in the Node.js V4 SDK
pubnub.push.deleteDevice(
{
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function (status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!");
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
PubNub's Mobile Push Gateway feature enables developers to bridge native PubNub publishing with 3rd-party push notification services including Google Android GCM (Google Cloud Messaging)/FCM (Firebase Cloud Messaging), Apple iOS APNS (Apple Push Notification Service), and Microsoft Windows Phone MPNS (Microsoft Push Notification Service).
By using the Mobile Push Gateway, developers can eliminate the need for developing, configuring, and maintaining additional server-side components for 3rd-party push notification providers.
Learn more about our Mobile Push Gateway here.
Enable push notifications on provided set of channels.
To run Adding Device to Channel
you can use the following method(s) in the PhoneGap V4 SDK
pubnub.push.addChannels(
{
channels: ['a', 'b'],
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function(status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!")
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
Request for all channels on which push notification has been enabled using specified pushToken.
To run Listing Channels For Device
you can use the following method(s) in the PhoneGap V4 SDK
pubnub.push.listChannels(
{
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function (status, response) {
if (status.error) {
console.log("operation failed w/ error:", status);
return;
}
console.log("listing push channel for device")
response.channels.forEach( function (channel) {
console.log(channel)
})
}
);
// Example of status
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
// Example of response
{
channels: [ 'a', 'b' ]
}
Disable push notifications on provided set of channels.
To run Removing Device From Channel
you can use the following method(s) in the PhoneGap V4 SDK
pubnub.push.removeChannels(
{
channels: ['a', 'b'],
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function(status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!")
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
Disable push notifications from all channels which is registered with specified pushToken.
To run Remove all push notifications
you can use the following method(s) in the PhoneGap V4 SDK
pubnub.push.deleteDevice(
{
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function (status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!");
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
Beta Version Available! | A beta release of the PubNub React framework, version 2.0 is now available. You can access it in the v2.0 branch of the react repository. |
PubNub's Mobile Push Gateway feature enables developers to bridge native PubNub publishing with 3rd-party push notification services including Google Android GCM (Google Cloud Messaging)/FCM (Firebase Cloud Messaging), Apple iOS APNS (Apple Push Notification Service), and Microsoft Windows Phone MPNS (Microsoft Push Notification Service).
By using the Mobile Push Gateway, developers can eliminate the need for developing, configuring, and maintaining additional server-side components for 3rd-party push notification providers.
Learn more about our Mobile Push Gateway here.
Enable push notifications on provided set of channels.
To run Adding Device to Channel
you can use the following method(s) in the React V4 SDK
pubnub.push.addChannels(
{
channels: ['a', 'b'],
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function(status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!")
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
Request for all channels on which push notification has been enabled using specified pushToken.
To run Listing Channels For Device
you can use the following method(s) in the React V4 SDK
pubnub.push.listChannels(
{
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function (status, response) {
if (status.error) {
console.log("operation failed w/ error:", status);
return;
}
console.log("listing push channel for device")
response.channels.forEach( function (channel) {
console.log(channel)
})
}
);
// Example of status
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
// Example of response
{
channels: [ 'a', 'b' ]
}
Disable push notifications on provided set of channels.
To run Removing Device From Channel
you can use the following method(s) in the React V4 SDK
pubnub.push.removeChannels(
{
channels: ['a', 'b'],
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function(status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!")
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
Disable push notifications from all channels which is registered with specified pushToken.
To run Remove all push notifications
you can use the following method(s) in the React V4 SDK
pubnub.push.deleteDevice(
{
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function (status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!");
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
PubNub's Mobile Push Gateway feature enables developers to bridge native PubNub publishing with 3rd-party push notification services including Google Android GCM (Google Cloud Messaging)/FCM (Firebase Cloud Messaging), Apple iOS APNS (Apple Push Notification Service), and Microsoft Windows Phone MPNS (Microsoft Push Notification Service).
By using the Mobile Push Gateway, developers can eliminate the need for developing, configuring, and maintaining additional server-side components for 3rd-party push notification providers.
Learn more about our Mobile Push Gateway here.
Enable push notifications on provided set of channels.
To run Adding Device to Channel
you can use the following method(s) in the Vue V4 SDK
import PubNubVue from 'pubnub-vue';
const pubnub = PubNubVue.getInstance();
pubnub.push.addChannels(
{
channels: ['a', 'b'],
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function(status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!");
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
Request for all channels on which push notification has been enabled using specified pushToken.
To run Listing Channels For Device
you can use the following method(s) in the Vue V4 SDK
import PubNubVue from 'pubnub-vue';
const pubnub = PubNubVue.getInstance();
pubnub.push.listChannels(
{
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function(status, response) {
if (status.error) {
console.log("operation failed w/ error:", status);
return;
}
console.log("listing push channel for device");
response.channels.forEach( function(channel) {
console.log(channel);
});
}
);
// Example of status
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
// Example of response
{
channels: [ 'a', 'b' ]
}
Disable push notifications on provided set of channels.
To run Removing Device From Channel
you can use the following method(s) in the Vue V4 SDK
import PubNubVue from 'pubnub-vue';
const pubnub = PubNubVue.getInstance();
pubnub.push.removeChannels(
{
channels: ['a', 'b'],
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function(status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!");
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
Disable push notifications from all channels which is registered with specified pushToken.
To run Remove all push notifications
you can use the following method(s) in the Vue V4 SDK
import PubNubVue from 'pubnub-vue';
const pubnub = PubNubVue.getInstance();
pubnub.push.deleteDevice(
{
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function(status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!");
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
PubNub's Mobile Push Gateway feature enables developers to bridge native PubNub publishing with 3rd-party push notification services including Google Android GCM (Google Cloud Messaging)/FCM (Firebase Cloud Messaging), Apple iOS APNS (Apple Push Notification Service), and Microsoft Windows Phone MPNS (Microsoft Push Notification Service).
By using the Mobile Push Gateway, developers can eliminate the need for developing, configuring, and maintaining additional server-side components for 3rd-party push notification providers.
Learn more about our Mobile Push Gateway here.
Enable push notifications on provided set of channels.
To run Adding Device to Channel
you can use the following method(s) in the JavaScript V4 SDK
pubnub.push.addChannels(
{
channels: ['a', 'b'],
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function(status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!")
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
Request for all channels on which push notification has been enabled using specified pushToken.
To run Listing Channels For Device
you can use the following method(s) in the JavaScript V4 SDK
pubnub.push.listChannels(
{
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function (status, response) {
if (status.error) {
console.log("operation failed w/ error:", status);
return;
}
console.log("listing push channel for device")
response.channels.forEach( function (channel) {
console.log(channel)
})
}
);
// Example of status
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
// Example of response
{
channels: [ 'a', 'b' ]
}
Disable push notifications on provided set of channels.
To run Removing Device From Channel
you can use the following method(s) in the JavaScript V4 SDK
pubnub.push.removeChannels(
{
channels: ['a', 'b'],
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function(status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!")
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}
Disable push notifications from all channels which is registered with specified pushToken.
To run Remove all push notifications
you can use the following method(s) in the JavaScript V4 SDK
pubnub.push.deleteDevice(
{
device: 'niceDevice',
pushGateway: 'apns' // apns, gcm, mpns
},
function (status) {
if (status.error) {
console.log("operation failed w/ error:", status);
} else {
console.log("operation done!");
}
}
);
{
error: false,
operation: 'PNPushNotificationEnabledChannelsOperation',
statusCode: 200
}