public class PushService
extends java.lang.Object
implements org.aerogear.mobile.core.ServiceModule
| Constructor and Description |
|---|
PushService() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.aerogear.mobile.core.MobileCore core,
org.aerogear.mobile.core.configuration.ServiceConfiguration serviceConfiguration) |
static void |
notifyHandlers(android.content.Context context,
java.util.Map<java.lang.String,java.lang.String> message)
Notify all registered handlers.
|
void |
refreshToken()
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.
|
boolean |
requiresConfiguration() |
java.lang.String |
type() |
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 java.lang.String type()
type in interface org.aerogear.mobile.core.ServiceModulepublic void configure(org.aerogear.mobile.core.MobileCore core,
org.aerogear.mobile.core.configuration.ServiceConfiguration serviceConfiguration)
configure in interface org.aerogear.mobile.core.ServiceModulepublic boolean requiresConfiguration()
requiresConfiguration in interface org.aerogear.mobile.core.ServiceModulepublic 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 void refreshToken()
public 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