REST.Backend.PushDevice.TPushEvents
Delphi
TPushEvents = class(TCustomPushEvents)
C++
class PASCALIMPLEMENTATION TPushEvents : public TCustomPushEvents
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | REST.Backend.PushDevice.pas REST.Backend.PushDevice.hpp |
REST.Backend.PushDevice | REST.Backend.PushDevice |
Description
Listens for push notification messages.
TPushEvents is used to listen for push notification messages. It initializes a TPushService component that is appropriate for the platform and the provider.
When the TPushService is initialized, the TPushEvents component has access to a DeviceToken that identifies the device. Next, TPushEvents registers the device with the cloud service so that the cloud service has an “address” to send messages.
A device is registered by executing a REST API request to the cloud service and passing the DeviceToken.
Note: TPushEvents will raise an exception when it is used on a platform that doesn’t provide a push service, such as Windows.