AeroGear Android Library 1.2.1

org.jboss.aerogear.android.impl.unifiedpush
Class AeroGearGCMPushRegistrar

java.lang.Object
  extended by org.jboss.aerogear.android.impl.unifiedpush.AeroGearGCMPushRegistrar
All Implemented Interfaces:
PushRegistrar

public class AeroGearGCMPushRegistrar
extends Object
implements PushRegistrar


Field Summary
static String PROPERTY_REG_ID
           
static long REGISTRATION_EXPIRY_TIME_MS
          Default lifespan (7 days) of a reservation until it is considered expired.
 
Constructor Summary
AeroGearGCMPushRegistrar(PushConfig config)
           
 
Method Summary
protected  String getRegistrationId(android.content.Context context)
          Gets the current registration id for application on GCM service.
 void register(android.content.Context context, Callback<Void> callback)
          Registers a device to a push network and any 3rd party application servers.
 void unregister(android.content.Context context, Callback<Void> callback)
          Unregisters a device a push network and any party application servers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_REG_ID

public static final String PROPERTY_REG_ID
See Also:
Constant Field Values

REGISTRATION_EXPIRY_TIME_MS

public static final long REGISTRATION_EXPIRY_TIME_MS
Default lifespan (7 days) of a reservation until it is considered expired.

See Also:
Constant Field Values
Constructor Detail

AeroGearGCMPushRegistrar

public AeroGearGCMPushRegistrar(PushConfig config)
Method Detail

register

public void register(android.content.Context context,
                     Callback<Void> callback)
Description copied from interface: PushRegistrar
Registers a device to a push network and any 3rd party application servers.

Specified by:
register in interface PushRegistrar
Parameters:
context - Android application context
callback - a callback.

unregister

public void unregister(android.content.Context context,
                       Callback<Void> callback)
Description copied from interface: PushRegistrar
Unregisters a device a push network and any party application servers.

Specified by:
unregister in interface PushRegistrar
Parameters:
context - Android application context
callback - a callback.

getRegistrationId

protected String getRegistrationId(android.content.Context context)
Gets the current registration id for application on GCM service.

If result is empty, the registration has failed.

Returns:
registration id, or empty string if the registration is not complete.

AeroGear Android Library 1.2.1

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.