Check if Trusted Device is Enrolled

There are 3 methods that you can use to check about Trusted Device enrollment:

  1. Check if this device is a Trusted Device

  2. Check if this account has any Trusted Device

  3. Check if Trusted Device is the default method of authentication for this account

Check if this device is a Trusted Device

Cotter.methods.trustedDeviceEnrolled(new CotterMethodChecker() {
    @Override
    public void onCheck(boolean enrolled) {
        thisDeviceEnrolled.setText("TrustedDevice enrolled this device: " + enrolled);
    }
});

Check if this account has any Trusted Device

Cotter.methods.trustedDeviceEnrolledAny(new CotterMethodChecker() {
    @Override
    public void onCheck(boolean enrolled) {
        anyDeviceEnrolled.setText("TrustedDevice enrolled any device: " + enrolled);
    }
});

Check if Trusted Device is the default method

Cotter.methods.trustedDeviceDefault(new CotterMethodChecker() {
    @Override
    public void onCheck(boolean defaultMethod) {
        trustedDeviceDefault.setText("TrustedDevice default: " + defaultMethod);
    }
});

Last updated