Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
push.on('registration', (data) => {
Backendless.Messaging.registerDevice(data.registrationId).then(
function () {
alert("Registration done");
},
function() {
alert("Oops. Something went wrong");
}
);
});
onRegister: function(device) {
Backendless.setupDevice({
uuid : DeviceInfo.getUniqueID(),
platform: device.os,
version : DeviceInfo.getSystemVersion()
});
Backendless.Messaging.registerDevice(device.token).then(
function() {
alert("Registration done");
},
function() {
alert("Oops. Something went wrong");
}
);
},