public class MpnDevice extends AbstractMpnDevice
LightstreamerClient
in order to successfully subscribe an MPN subscription.
See MpnSubscription
.LightstreamerClient.registerForMpn(MpnDeviceInterface)
method, which enables the client to subscribe MPN subscriptions and sends the device details to the
server's MPN Module, where it is assigned a permanent device ID and its state is switched to "registered".LightstreamerClient.getMpnSubscriptions(String)
method.Constructor and Description |
---|
MpnDevice(android.content.Context appContext,
java.lang.String token)
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 some more details: The package name, through the Application Context. Any previously registered device token, from the Shared Preferences storage. It then saves the current device token on the Shared Preferences storage. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getPlatform()
The platform identifier of this MPN device.
|
addListener, getApplicationId, getDeviceId, getDeviceToken, getListeners, getPreviousDeviceToken, getStatus, getStatusTimestamp, isRegistered, isSuspended, removeListener
public MpnDevice(@Nonnull android.content.Context appContext, @Nonnull java.lang.String token)
appContext
- the Application Contexttoken
- the device tokenjava.lang.IllegalArgumentException
- if context
, senderId
or token
are null.