public class DeviceValidation
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
check(java.lang.String licence,
Activity activity,
Callback callback)
Run device validation, only for apps that support Android API < 14.
|
static void |
check(java.lang.String licence,
Callback callback)
Run device validation for apps that support Android API >= 14.
|
static void |
getData(Callback customerCallback)
Run device validation for apps that support Android API >= 14.
|
static void |
init(Context context) |
public static void init(Context context)
public static void check(java.lang.String licence, Callback callback)
Run device validation for apps that support Android API >= 14. The check method is called from a host application in order to start the device verification process. During validation the library will collect some data about the device and send to the DeviceAssure servers to process. Should an error occur during the sending and processing that library will attempt to retry the validation a number of times. After all the retries have been exhausted and not successful response returned the library will sent a'Failed to connect'
message back via the handleError callback method. In the case where the device has no internet connectivity, a'No Internet Connection'
message will be returned via the handleError callback method and no validation is performed.
licence
- Licence key required to perform the validation. Must be a valid licence key.callback
- The callback class that the library will use to inform the host application when the
operation has been successful or an error occurred.public static void getData(Callback customerCallback)
Run device validation for apps that support Android API >= 14. The check method is called from a host application in order to start the device verification process. During validation the library will collect some data about the device and return the data collected to the caller. Should an error occur during the sending and processing that library will attempt to retry the validation a number of times. After all the retries have been exhausted and not successful response returned the library will sent a'Failed to connect'
message back via the handleError callback method. In the case where the device has no internet connectivity, a'No Internet Connection'
message will be returned via the handleError callback method and no validation is performed.
callback
- The callback class that the library will use to inform the host application when the
operation has been successful or an error occurred.public static void check(java.lang.String licence, Activity activity, Callback callback)
Run device validation, only for apps that support Android API < 14. The check method is called from a host application in order to start the device verification process. During validation the library will collect some data about the device and send to the DeviceAssure servers to process. Should an error occur during the sending and processing that library will attempt to retry the validation a number of times. After all the retries have been exhausted and not successful response returned the library will sent a'Failed to connect'
message back via the handleError callback method. In the case where the device has no internet connectivity, a'No Internet Connection'
message will be returned via the handleError callback method and no validation is performed.
licence
- Licence key required to perform the validation. Must be a valid licence key.activity
- The activity is used by the library to get the ApplicationContext.
If this method is called from API > 14, this parameter is ignored
and fetched from ActivityLifeCycleCallbacks.callback
- The callback class that the library will use to inform the host application when the
operation has been successful or an error occurred.