Add the following line of code to initialise it with the api key you obtained from the Tutelar client panel. If you don’t have an api key, create a new one.
Tutelar tutelar = new Tutelar(context, "YOUR API KEY");
Step 3 - Implement Listener
Set and Implement our listener to receive the device details.
public class DemoActivity extends AppCompatActivity implements TutelarListener {
@Override
public void onSuccess(String data) {
// Success Callback
}
@Override
public void onFailure(String message) {
// Failure Callback
}
}
Step 4 - Getting Device Info
By passing the listener, call the following function to receive the device info shown below
tutelar.getDeviceDetails(this);
Step 5 - Proguard Rules (optional)
The Proguard rules are already included in the SDK, If you encounter a problem when using Proguard use.
-keep, allowobfuscation, allowshrinking interface retrofit2.Call
-keep, allowobfuscation, allowshrinking class retrofit2.Response
-keep, allowobfuscation, allowshrinking class kotlin.coroutines.** { *; }
-dontwarn io.tutelar.**
-keep class io.tutelar.** {*;}