public class PushService
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PushService.Builder |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TYPE |
| Constructor and Description |
|---|
PushService(android.content.Context context,
UnifiedPushCredentials unifiedPushCredentials) |
| Modifier and Type | Method and Description |
|---|---|
static void |
notifyHandlers(android.content.Context context,
java.util.Map<java.lang.String,java.lang.String> message)
Notify all registered handlers.
|
static void |
refreshToken(android.content.Context context)
Update the device token on Unified Push Server
|
static void |
registerBackgroundThreadHandler(MessageHandler handler)
When a push message is received, all background thread handlers will be notified on a non UI
thread.
|
org.aerogear.mobile.core.reactive.Request<java.lang.Boolean> |
registerDevice()
Register the device on Unified Push Server
|
org.aerogear.mobile.core.reactive.Request<java.lang.Boolean> |
registerDevice(UnifiedPushConfig unifiedPushConfig)
Register the device on Unified Push Server
|
static void |
registerMainThreadHandler(MessageHandler handler)
When a push message is received, all main thread handlers will be notified on the main(UI)
thread.
|
static void |
unregisterBackgroundThreadHandler(MessageHandler handler)
This will remove the given handler from the collection of background thread handlers.
|
org.aerogear.mobile.core.reactive.Request<java.lang.Boolean> |
unregisterDevice()
Unregister the device on Unified Push Server
|
static void |
unregisterMainThreadHandler(MessageHandler handler)
This will remove the given handler from the collection of main thread handlers.
|
public static final java.lang.String TYPE
public PushService(android.content.Context context,
UnifiedPushCredentials unifiedPushCredentials)
public org.aerogear.mobile.core.reactive.Request<java.lang.Boolean> registerDevice()
public org.aerogear.mobile.core.reactive.Request<java.lang.Boolean> registerDevice(UnifiedPushConfig unifiedPushConfig)
unifiedPushConfig - Unified Push configuration to be send to the Unified Push Serverpublic org.aerogear.mobile.core.reactive.Request<java.lang.Boolean> unregisterDevice()
public static void refreshToken(android.content.Context context)
context - Application contextpublic static void registerMainThreadHandler(MessageHandler handler)
handler - a handler to added to the list of handlers to be notified.public static void registerBackgroundThreadHandler(MessageHandler handler)
handler - a handler to added to the list of handlers to be notified.public static void unregisterMainThreadHandler(MessageHandler handler)
handler - a handler to be removed to the list of handlerspublic static void unregisterBackgroundThreadHandler(MessageHandler handler)
handler - a handler to be removed to the list of handlerspublic static void notifyHandlers(android.content.Context context,
java.util.Map<java.lang.String,java.lang.String> message)
context - the Android contextmessage - the push message