MpnDevice constructor
Creates an object to be used to describe an MPN device that is going to be registered to the MPN Module of Lightstreamer Server. *
- During creation the MpnDevice tries to acquires any previously registered device token from localStorage.
- It then saves the current device token on localStorage. Saving and retrieving the previous device token is used to handle automatically
- the cases where the token changes. The MPN Module of Lightstreamer Server is able to move
- MPN subscriptions associated with the previous token to the new one.
-
token
the device token
-
appId
the application identifier
-
platform
either "Google" for Google's Firebase Cloud Messaging (FCM) or "Apple" for Apple Push Notification Service (APNs)
- Throws IllegalArgumentException if
token
orappId
is null orplatform
is not "Google" or "Apple".
Implementation
external factory MpnDevice(String token, String appId, String platform);