File: JVE.PushWoosh.pas Inheritance: TComponent ⬅ TJVEPushNotification ⬅ TJVEPushWoosh
As mentioned above, the TJVEPushNotification component only takes care about the operating system integration, not communications with any push notifications provider server.
The TJVEPushWoosh component provides an interface to the PushWoosh service for push notifications delivery; see http://www.pushwoosh.com for more details. This component takes care of all the required communications with this server.
A single new mandatory property is exposed by this component: ApplicationCode, which is the identifier, assigned to your application by the PushWoosh service.
In addition to this, the Push content class provides the following functions, defined in a helper class:
- GetLink – returns the link, which was sent with the message.
- GetHash – returns the message’s unique identifier (should not normally be used).
- GetCustomData – returns any custom data sent with the notification.
It should be noted that this implementation of the PushWoosh interface specifically does not support HTML Pages notifications. Please do not attempt to send these to your Delphi app.
PushWoosh service also supports sending user’s location and various user-related tags (which could all be used then to filter the user, which should receive a particular notification). To use these services you might need a premium PushWoosh account.
Access to these services is provided via a number of public (not published) properties:
- Location – the current world location of the user.
- TagString[Name]:String – string tag value; use to get or set.
- TagInteger[Name]:Integer – integer tag value; use to get or set.
- TagList[Name]:TArray<String> – list tag value; use to get or set.
- DeleteTag(Name) – this is a procedure, not a property; call this to delete a tag.
Notice, PushWoosh preserves current values on its services, so the client implementation mimics that, keeping all the tags’ values persistent in the device.