createDevice
Creates a new device associated with the user account. This device will be registered to receive alerts based on The Common Alerting Protocol (CAP).
When creating a device, you need to provide an instance of the AlertDevice class. Note that it is not necessary to set the jidResource
property of the AlertDevice, as this method automatically calculates and assigns it based on the device's details.
Parameters
device
An AlertDevice object containing the details of the device to be created.
listener
A RainbowListener that receives the created AlertDevice object upon successful registration, or an error if the creation fails.