public class AeroGearGCMPushRegistrar extends Object implements PushRegistrar
| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_REG_ID |
static long |
REGISTRATION_EXPIRY_TIME_MS
Default lifespan (7 days) of a registration until it is considered
expired.
|
| Constructor and Description |
|---|
AeroGearGCMPushRegistrar(AeroGearGCMPushConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
String |
getRegistrationId(android.content.Context context)
Gets the current registration id for application on GCM service.
|
void |
register(android.content.Context context,
org.jboss.aerogear.android.core.Callback<Void> callback)
Registers a device to a push network and any 3rd party application servers.
|
void |
setPasswordAuthentication(String username,
String password,
org.jboss.aerogear.android.pipe.http.HttpProvider provider) |
void |
unregister(android.content.Context context,
org.jboss.aerogear.android.core.Callback<Void> callback)
Unregister device from Unified Push Server.
|
public static final long REGISTRATION_EXPIRY_TIME_MS
public static final String PROPERTY_REG_ID
public AeroGearGCMPushRegistrar(AeroGearGCMPushConfiguration config)
public void register(android.content.Context context,
org.jboss.aerogear.android.core.Callback<Void> callback)
PushRegistrarregister in interface PushRegistrarcontext - Android application contextcallback - a callback.public void unregister(android.content.Context context,
org.jboss.aerogear.android.core.Callback<Void> callback)
unregister in interface PushRegistrarcontext - Android application contextcallback - a callback.public String getRegistrationId(android.content.Context context)
If result is empty, the registration has failed.
context - the application contextCopyright © 2015 JBoss by Red Hat. All rights reserved.