@ThreadSafe @LevelUpApi(contract=PUBLIC) public final class GcmDeviceRequestFactory extends AbstractRequestFactory
Constructor and Description |
---|
GcmDeviceRequestFactory(Context context,
AccessTokenRetriever retriever) |
Modifier and Type | Method and Description |
---|---|
AbstractRequest |
buildRegisterGcmDeviceRequest(String registrationId)
Builds a request which associates a GCM registration ID with a mobile device.
|
AbstractRequest |
buildUnregisterGcmDeviceRequest(String registrationId)
Builds a request which dissociates a GCM registration ID from the platform.
|
getAccessTokenRetriever, getContext
public GcmDeviceRequestFactory(Context context, AccessTokenRetriever retriever)
context
- Application context.retriever
- The AccessTokenRetriever
to use to retrieve the
AccessToken
.public AbstractRequest buildRegisterGcmDeviceRequest(String registrationId)
Permissions.PERMISSION_CREATE_ORDERS
and
Permissions.PERMISSION_READ_QR_CODE
permissions.registrationId
- Google-issued GCM registration ID received by the app.AbstractRequest
to register a GCM device with the platform.public AbstractRequest buildUnregisterGcmDeviceRequest(String registrationId)
registrationId
- Google-issued GCM registration ID received by the app.AbstractRequest
to unregister a GCM device from the platform.