public class AbstractPush
This class defines the behaviour of a Push implementation, and should be extended within the library to support with new providers.
Modifier and Type | Class and Description |
---|---|
static class |
AbstractPush.Companion |
static class |
AbstractPush.PushRegistration
This class manages metadata necessary for registering a device for push notifications.
|
class |
AbstractPush.RegisterPush
Request object for posting to the REST endpoint to register a user for push notifications
|
class |
AbstractPush.UnregisterPush
Request object for posting to REST endpoint to unregister a user from push notifications
|
Modifier and Type | Field and Description |
---|---|
static AbstractPush.Companion |
Companion |
static java.lang.String |
REGISTER_PUSH_REST_PATH |
static java.lang.String |
TAG |
static java.lang.String |
UNREGISTER_PUSH_REST_PATH |
Constructor and Description |
---|
AbstractPush(Client<?> client)
This class defines the behaviour of a Push implementation, and should be extended within the library to support with new providers.
|
Modifier and Type | Method and Description |
---|---|
AbstractPush.RegisterPush |
createRegisterPushRequest(AbstractPush.PushRegistration pushRegistration) |
AbstractPush.UnregisterPush |
createUnregisterPushRequest(AbstractPush.PushRegistration pushRegistration) |
void |
disablePush() |
void |
disablePushViaRest(com.kinvey.java.core.KinveyClientCallback<java.lang.Object> callback,
java.lang.String deviceID)
Async wrapper for disabling push notifications for the current user
|
void |
enablePushViaRest(com.kinvey.java.core.KinveyClientCallback<java.lang.Object> callback,
java.lang.String deviceID)
Async wrapper for enabling push notification for the current user
|
Client<?> |
getClient() |
java.lang.String |
getPushId() |
java.lang.Class<?> |
getPushServiceClass() |
java.lang.String[] |
getSenderIDs() |
AbstractPush |
initialize(android.app.Application currentApp) |
boolean |
isInProduction() |
boolean |
isPushEnabled() |
void |
setClient(Client<?> p) |
void |
setInProduction(boolean p) |
void |
setPushServiceClass(java.lang.Class<?> p) |
void |
setSenderIDs(java.lang.String[] p) |
public static java.lang.String TAG
public static java.lang.String UNREGISTER_PUSH_REST_PATH
public static java.lang.String REGISTER_PUSH_REST_PATH
public static AbstractPush.Companion Companion
public AbstractPush(Client<?> client)
This class defines the behaviour of a Push implementation, and should be extended within the library to support with new providers.
public java.lang.Class<?> getPushServiceClass()
public void setPushServiceClass(java.lang.Class<?> p)
public AbstractPush initialize(android.app.Application currentApp)
public java.lang.String getPushId()
public boolean isPushEnabled()
public void disablePush()
public boolean isInProduction()
public void setInProduction(boolean p)
public java.lang.String[] getSenderIDs()
public void setSenderIDs(java.lang.String[] p)
public void enablePushViaRest(com.kinvey.java.core.KinveyClientCallback<java.lang.Object> callback, java.lang.String deviceID)
Async wrapper for enabling push notification for the current user
callback
- a callback with results of registration
deviceID
- the current device's unique id from GCM
public void disablePushViaRest(com.kinvey.java.core.KinveyClientCallback<java.lang.Object> callback, java.lang.String deviceID)
Async wrapper for disabling push notifications for the current user
callback
- a callback with results of unregistration
deviceID
- the current device's unique id from GCM
public AbstractPush.RegisterPush createRegisterPushRequest(AbstractPush.PushRegistration pushRegistration)
public AbstractPush.UnregisterPush createUnregisterPushRequest(AbstractPush.PushRegistration pushRegistration)
public Client<?> getClient()
public void setClient(Client<?> p)