public class RegistrationClient extends Endpoint
Modifier and Type | Class and Description |
---|---|
static class |
RegistrationClient.RegisterAsyncTask
AsyncTask to register our with the server
|
static class |
RegistrationClient.UnregisterAsyncTask
AsyncTask to unregister from server
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
ERROR_INVALID_REGID |
private java.lang.String |
ERROR_NOT_REGISTERED |
private java.lang.String |
ERROR_REGISTER |
private java.lang.String |
ERROR_UNREGISTER |
private static RegistrationClient |
sInstance |
private java.lang.String |
TAG |
ERROR_CREDENTIAL, ERROR_UNKNOWN, mContext
Modifier | Constructor and Description |
---|---|
private |
RegistrationClient(android.content.Context context) |
Modifier and Type | Method and Description |
---|---|
private com.weebly.opus1269.clipman.backend.registration.Registration |
getRegistrationService(com.google.api.client.googleapis.auth.oauth2.GoogleCredential credential)
Get an authorized connection to the RegistrationEndpoint
|
static RegistrationClient |
INST(android.content.Context context)
Lazily create our instance
|
com.weebly.opus1269.clipman.backend.registration.model.EndpointRet |
register(java.lang.String idToken,
java.lang.Boolean refresh)
Register with server - Blocks
|
private com.weebly.opus1269.clipman.backend.registration.model.EndpointRet |
unregister()
Unregister with server - Blocks
|
getAndroidJsonFactory, getCredential, getNetHttpTransport, getRegToken, notSignedIn, setHttpTimeout, setLocalServer
private static RegistrationClient sInstance
private final java.lang.String TAG
private final java.lang.String ERROR_REGISTER
private final java.lang.String ERROR_UNREGISTER
private final java.lang.String ERROR_INVALID_REGID
private final java.lang.String ERROR_NOT_REGISTERED
private RegistrationClient(@NonNull android.content.Context context)
public static RegistrationClient INST(@NonNull android.content.Context context)
context
- any old contextpublic com.weebly.opus1269.clipman.backend.registration.model.EndpointRet register(java.lang.String idToken, java.lang.Boolean refresh)
idToken
- - authorization token or nullrefresh
- - true is refreshing exisitng tokenprivate com.weebly.opus1269.clipman.backend.registration.model.EndpointRet unregister()
@NonNull private com.weebly.opus1269.clipman.backend.registration.Registration getRegistrationService(com.google.api.client.googleapis.auth.oauth2.GoogleCredential credential)
credential
- - authorization for current user