public final class Registration extends SensitivityBase
host, serviceUrl| Constructor and Description |
|---|
Registration(android.content.Context context)
Constructor.
|
Registration(android.content.Context context,
java.lang.String serviceUrl,
java.lang.String host)
Constructor with custom service URL and host.
|
| Modifier and Type | Method and Description |
|---|---|
void |
register(java.lang.String accountId,
java.lang.String projectId,
java.lang.String authKey,
RegistrationListener registrationListener)
Executes a call to register the device to the server.
|
void |
unregister()
Clears your registration credentials.
|
getAccountId, getAppId, getAuthKey, getContext, getPrefs, getProjectId, isRegisteredpublic Registration(android.content.Context context)
context - The context.public Registration(android.content.Context context,
java.lang.String serviceUrl,
java.lang.String host)
context - The context.serviceUrl - The service URL for the server. The default service URL is "https://api.sensitivity.io/api/v1/"host - The host for the server. The default host is "api.sensitivity.io".public void register(java.lang.String accountId,
java.lang.String projectId,
java.lang.String authKey,
RegistrationListener registrationListener)
RegistrationListener.accountId - Your account id.projectId - Your project id.authKey - Your auth key.registrationListener - The RegistrationListener which will receive the response.public void unregister()