JavaScript SDK Backendless.Messaging.registerDevice documentation ?

At SDK source exist registerDevice, but no documentation information. Also when I try to use registerDevice function, device.uuid is undefined.

Is these feature ready for JavaScript SDK ?

TIA

Hi there,

to perform this operation it is assumed that the device uuid already exists in your window.device object.
And the syntax for registerDevice is like next:

Backendless.Messaging.registerDevice(['TestChannel'] [, async])

where the first argument is the array of channels and the ‘async’ is an optional argument (should be an instance of Backendless.Async);

If you have any questions on how Messaging works, do not hesitate to ask me in this thread.

The docs will be updated soon.

Regards,
Stanislav

Hola, estoy intentando lo siguiente

Sender_ID = “985370318080”;
theme = “default”;
Backendless.Messaging.registerDevice (Sender_ID, tema, nuevo Backendless.Async (con éxito, error))

función successful (data) {
console.log (“successful:” + JSON.stringify (data));
}

error de función {err} {
console.log (“error:” + JSON.stringify (err));
}

Error: TypeError: No se puede leer la propiedad ‘uuid’ de undefined: Nombre: TypeError: No se puede leer la propiedad ‘uuid’ de undefined

Hi Oscar,

In order to register a device with Backendless, it must be registered with APNS or GCM/FCM first. Do you already do that in your app?

Regards,
Mark

Yes, I register,
Is it well created?

Implement your new services
checkhttps://www.gstatic.com/mobilesdk/150820_mobilesdk/images/service_icons/gcm_icon.svg</img>Cloud MessagingServer API KeyhelpAIzaSyCHE5CGlMraU4wTN3iieQ4Fjy9Gk7Prz4gSender ID:help985370318080

Please provide a code sample where you do device registration on APNS or GCM/FCM and receive the device’s uuid.