communication provider used to transport push messages to a push Device.
This models the Java enum com.mwaysolutions.gofer2.push.domain.ProviderType
.
receives incoming push notification messages once registered using listenPushNotification()
.
For each incoming push notification message the callback is executed performing some app-specific action. The caller will wait until the optionally returned promise gets resolved, before signalling the operating system the message got processed completely.
Notice, the next push notification message may be passed to the callback even before the returned promise completed. This is, the optional promise returned just controls when the end of processing gets signalled to the operating system, but not when the app is ready.
Also, care must be taken as processing of a push notification message must not exceed more than 30s according to push plugin documentation at https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PAYLOAD.md. For that reason it makes no sense to display some blocking user interface here!
If during any of these steps some error is detected, the callback is executed. This holds even when during processing of a push notification message the callback itself signalled an error. In this case, both parameters are supplied.
an incoming push notification message.
transmission status of a push Job.
This models the Java enum com.mwaysolutions.gofer2.push.domain.State
.
authorizes current Relution server logged onto to send push notifications by transmitting the registration token.
installs a callback for receiving push notification messages, and registers the device with the 3rd party push service provider.
Usually push configuration is provided to init()
and a call to this method is chained passing
the sink callback. Application using an explicit login then call configurePushDevice()
as part
of the LogonCallback
while anonymous applications call the latter directly.
In general it is not wise to unregister from push messages. However, this functionality is
available by passing null
as callback.
to install, or explicitly null to unregister.
promise of registration, for informal purposes.
posts push notification(s).
Usually the server sends push notifications on its own behalf. However, this method may be used by the client app itself to send push notifications either to other clients, or to itself which can be used to test connectivity.
The implementation relies on backend code generated by CLI which forwards the body JSON to the server-side implementation of this method.
to deliver.
promise of async execution resolving to UUIDs of jobs in asynchronous delivery, empty when no apps or devices got selected by the message criteria or null when no target apps or devices exist at all.
registers a target device with the current Relution server.
The implementation relies on backend code generated by CLI. That code attempts fetching an existing device using the metadata information send as request body data. If it finds one, that device is updated. Otherwise a new device is created and stored in the database. The updated device registration record then is sent as response body data.
to register.
promise of registered device.
Generated using TypeDoc