Documentation 3.0 Beta
Registering Devices for Client Actions
Before a client app can get actions from the Akula Action Service, the device must register with the Akula Server. This device registration is the same as for push notifications. It pairs a unique device ID with an app so that when an app communicates with the Action Service, it gets actions only for that device.
You register the device with the AKDevice (
iOS) or AK.Device (
init() method. These methods take a single argument, a callback method, that the app calls when the device registration successfully completes.
When you call the
init() method, Akula stores the device ID and platform information about the device.
You only need to register the device once, but you should check that the device is still registered every time the app starts. Subsequent launches of the app do not require that you re-register the device, unless there is a new version of the app, the push token has expired, or some other change has occurred that requires a re-registration of the device.
The following example initializes a client app on Android:
The following example initializes a client app on iOS: