-
public final class PushSubscriptionStateA subscription state.
-
-
Constructor Summary
Constructors Constructor Description PushSubscriptionState(String id, String token, Boolean optedIn)
-
Method Summary
Modifier and Type Method Description final StringgetId()The unique identifier for this subscription. final StringgetToken()The token which identifies the device/app that notifications are to be sent. final BooleangetOptedIn()Whether the user of this subscription is opted-in to received notifications. final JSONObjecttoJSONObject()-
-
Method Detail
-
getId
final String getId()
The unique identifier for this subscription. This will be an empty string until the subscription has been successfully created on the backend and assigned an ID. Use addObserver to be notified when the id has been successfully assigned.
-
getToken
final String getToken()
The token which identifies the device/app that notifications are to be sent. May be an empty string, indicating the push token has not yet been retrieved.
-
getOptedIn
final Boolean getOptedIn()
Whether the user of this subscription is opted-in to received notifications. When true, the user is able to receive notifications through this subscription. Otherwise, the user will not receive notifications through this subscription (even when the user has granted app permission).
-
toJSONObject
final JSONObject toJSONObject()
-
-
-
-