public enum MpnDeviceStatus extends java.lang.Enum<MpnDeviceStatus>
deviceStatus
field of MpnStatusInfo
by the MpnSubscription.checkStatus()
method.
Active
: the MPN device is active (its MPN subscriptions are sending notifications);
Suspended
: the MPN device has been suspended due to invalidation of the registration ID by GCM service.
Active
value is the common status of an MPN device. Active MPN subscriptions related to this device
are sending their mobile push notifications (i.e. cloud messages) as usual.
Suspended
status indicates the device is temporarily not active, but it will be reactivated as soon as
a registration ID change is notified to the Server. This status is reversible and usually requires no action. See
LSClient.registerForMpn(android.content.Context, String, MpnRegistrationListener)
for more information.
Note that a suspended device may be deactivated (and hence deleted) by the Server, if no registration ID change is notified within a timeout period (by default a week).
MpnSubscription.checkStatus()
for a device with no more active or triggered subscriptions will result in an PushUserException
with error code 45 (device unknown).Enum Constant and Description |
---|
Active
MPN device status indicating that the device is active (its MPN subscriptions do send notifications).
|
Suspended
MPN device status indicating that the device has been suspended due to invalidation of the registration ID by the GCM service.
|
Modifier and Type | Method and Description |
---|---|
static MpnDeviceStatus |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MpnDeviceStatus[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MpnDeviceStatus Active
public static final MpnDeviceStatus Suspended
public static MpnDeviceStatus[] values()
for (MpnDeviceStatus c : MpnDeviceStatus.values()) System.out.println(c);
public static MpnDeviceStatus valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null