Registration¶
To use the SDK, you have to register the software.
Registration allows you to use the SDK fully, although some features may be limited in time depending on the license.
Registration Example¶
This is how you would perform registration in your app if you were doing it from your own activity. Use the provided Registry
class, and call the registerClientAsync
method with your license key.
Registry registry = new Registry(this);
if (registry.isClientRegistered()) {
return;
}
registry.registerClientAsync(
"REPLACE_WITH_YOUR_REGISTRATION_KEY",
"your-client-label", // optional: you can pass a label here, which will be used to identify the client. This must be unique across all of your clients!
null, // optional: pass an ArrayList of strings here, which serve as tags for the client.
new Registry.OnClientRegisteredListener() {
@Override
public void onClientRegistered() {
// store the state that the client is registered
}
@Override
public void onClientRegistrationFailed(RuntimeException e) {
// log or display an error
}
}
);
Here are some notes:
- Registration is a one-time process: the state will be stored in the secure preferences of the app.
- Ideally your implementing client application should also store the state that the client is registered.
- The registration key is provided by AVEQ. If it does not work, please contact us.
- The registration should be done asynchronously to avoid blocking the main thread.