public abstract class BadgeCondition
extends java.lang.Object
BadgeCondition abstract class wraps all the attributes related to conditions that are
restricting the badge from use. There are many factors that can dictate the BadgeModel
status, which can be categorized into two groups: standard and optional.
The standard group of badge conditions include those that are configured in Network Manager.
These include:
TYPE_BADGE_REVOKED_BY_ADMINTYPE_AUTHENTICATIONTYPE_TERM_OF_USETYPE_PRIVACY_POLICYTYPE_DEVICE_PROVISION_ENROLLMENTTYPE_DEVICE_PROVISION_VERIFICATION
These restrictions must be resolved before the badge can be activated, which is reflected in
BadgeEntity.status(). For example, if Network Manager has revoked a badge on a certain
device, then the badge status on this device will be BadgeEntity.Status.REVOKED. A
revoked badge is unavailable for use. If the badge requires extra authentication
(i.e. logging in) but the badge has not been authenticated, the badge status will be
BadgeEntity.Status.PENDING_LOGIN. To successfully activate the badge, the user must log
in to the badge with the correct username and password to finish authentication. These
badge conditions are enforced on both client and server side.
The optional group of badge conditions can be configured in Network Manager, as well as in the
SDK. These include:
TYPE_PASSCODE_ENROLLMENT_REQUIREDTYPE_FINGER_PRINT_HARDWARE_REQUIREDTYPE_FINGER_PRINT_ENROLLMENT_REQUIREDTYPE_PASSCODE_OR_FINGERPRINT_REQUIREDTYPE_PASSCODE_VERIFICATION_REQUIREDTYPE_LOCATION_SETTINGS_ONTYPE_LOCATION_PERMISSION_REQUIREDTYPE_BLUETOOTH_SUPPORTEDTYPE_BLUETOOTH_SETTINGS_ONTYPE_LOCATION_RESTRICTIONTYPE_TIME_RESTRICTIONTYPE_PHOTOWhen Network Manager requires the badge condition and the SDK configuration supports said configuration, then the badge condition will be enforced before allowing any physical or logical access.
For example, assume Network Manager has turned on the Bluetooth requirement for a badge and the
SDK has been configured through BadgeCondition.Config.supportBluetooth() to support Bluetooth. This
means that the user is required to turn on Bluetooth before the badge can be activated. Assume
that the badge has resolved all pending badge conditions except turning on Bluetooth. Then, the
BadgeModel.pendingBadgeConditionList() will return a List of one
BadgeCondition object, whose type is TYPE_BLUETOOTH_SETTINGS_ON.
Based on this list of BadgeCondition objects, you can provide guidance for the user to
turn on Bluetooth.
Please note that for activated BadgeModel and BadgeEntity
objects, there are no pending badge conditions that must be resolved.
By default, all of the configurable badge conditions on the client side are false. This means
that as long as the badge has been activated, there will be no BadgeConditionException.
Otherwise, you must check whether the BadgeModel object has any pending badge conditions
through BadgeModel.pendingBadgeConditionList().
| Modifier and Type | Class and Description |
|---|---|
static class |
BadgeCondition.Config
The
BadgeCondition.Config abstract class wraps the properties related to badge condition
configurations on Network Manager. |
| Modifier and Type | Field and Description |
|---|---|
static int |
TYPE_AUTHENTICATION
The badge requires extra authentication by means of inputting the user name/password.
|
static int |
TYPE_BADGE_REVOKED_BY_ADMIN
The badge installed on the current device has been revoked by a network administrator
on Network Manager.
|
static int |
TYPE_BLUETOOTH_SETTINGS_ON
The badge requires the user to turn on Bluetooth settings before continuing use.
|
static int |
TYPE_BLUETOOTH_SUPPORTED
The badge requires a device that supports Bluetooth.
|
static int |
TYPE_DEVICE_PROVISION_ENROLLMENT
The badge requires the user to enroll a mobile phone number to bind with the badge.
|
static int |
TYPE_DEVICE_PROVISION_VERIFICATION
The badge requires the user to verify the mobile phone number that has been associated with
the badge.
|
static int |
TYPE_FINGER_PRINT_ENROLLMENT_REQUIRED
The badge requires prior fingerprint enrollment on the device.
|
static int |
TYPE_FINGER_PRINT_HARDWARE_REQUIRED
The badge requires a device that supports fingerprint verification.
|
static int |
TYPE_FINGER_PRINT_VERIFICATION_REQUIRED
The badge requires the user to verify the fingerprint before continuing use.
|
static int |
TYPE_LOCATION_PERMISSION_REQUIRED
The badge requires the user to grant permission to use location before continuing use.
|
static int |
TYPE_LOCATION_RESTRICTION
The badge can only be used in certain geo locations that are defined on Network Manager.
|
static int |
TYPE_LOCATION_SETTINGS_ON
The badge requires the user to turn on Location Services before continuing use.
|
static int |
TYPE_PASSCODE_ENROLLMENT_REQUIRED
The badge requires the user to enroll an independent app passcode.
|
static int |
TYPE_PASSCODE_OR_FINGERPRINT_REQUIRED
The badge requires the user to verify the passcode or fingerprint before continuing use.
|
static int |
TYPE_PASSCODE_VERIFICATION_REQUIRED
The badge requires the user to verify the passcode before before continuing use.
|
static int |
TYPE_PHOTO
The badge requires the user to upload a profile photo before continuing use.
|
static int |
TYPE_PRIVACY_POLICY
The badge requires the user to accept the privacy policy.
|
static int |
TYPE_TERM_OF_USE
The badge requires the user to accept the terms of use.
|
static int |
TYPE_TIME_RESTRICTION
The badge can only be used in certain time windows that are defined on Network Manager.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Returns a boolean that represents whether or not two badge conditions are equal.
|
abstract int |
getType()
Returns an int of the type of badge condition.
|
int |
hashCode()
Returns an int of the hashCode of the type and mustResolved of the badge condition.
|
public static final int TYPE_BADGE_REVOKED_BY_ADMIN
BadgeCondition value is
100.public static final int TYPE_AUTHENTICATION
BadgeCondition can also be recovered by specifying the
BadgeLoginParam and calling
BadgeRecoveryManager.login(BadgeLoginParam, SingleCallback) without getting the
badge first through a badge recovery email. BadgeCondition value is
101.public static final int TYPE_TERM_OF_USE
BadgeManager.acknowledgeLegalAgreement(int, boolean, boolean, SingleCallback).
BadgeCondition value is 102.public static final int TYPE_PRIVACY_POLICY
BadgeManager.acknowledgeLegalAgreement(int, boolean, boolean, SingleCallback).
BadgeCondition value is 103.public static final int TYPE_DEVICE_PROVISION_ENROLLMENT
DeviceProvisioningManager.enroll(int, String, CompleteCallback) to initiate the
enrollment process. BadgeCondition value is 104.public static final int TYPE_DEVICE_PROVISION_VERIFICATION
DeviceProvisioningManager.request(int, CompleteCallback) to initiate the verification
process. BadgeCondition value is 105.public static final int TYPE_PASSCODE_ENROLLMENT_REQUIRED
BadgeCondition
value is 106.public static final int TYPE_FINGER_PRINT_HARDWARE_REQUIRED
BadgeCondition
value is 107.public static final int TYPE_FINGER_PRINT_ENROLLMENT_REQUIRED
BadgeCondition value
is 108.public static final int TYPE_PASSCODE_OR_FINGERPRINT_REQUIRED
BadgeCondition value is 109.public static final int TYPE_PASSCODE_VERIFICATION_REQUIRED
BadgeCondition value is 110.public static final int TYPE_FINGER_PRINT_VERIFICATION_REQUIRED
BadgeCondition value is 111.public static final int TYPE_LOCATION_PERMISSION_REQUIRED
BadgeCondition value is 112.public static final int TYPE_LOCATION_SETTINGS_ON
BadgeCondition value is 113.public static final int TYPE_BLUETOOTH_SUPPORTED
BadgeCondition value is 114.public static final int TYPE_BLUETOOTH_SETTINGS_ON
BadgeCondition value is 115.public static final int TYPE_LOCATION_RESTRICTION
BadgeCondition value is 116.public static final int TYPE_TIME_RESTRICTION
BadgeCondition value is 117.public static final int TYPE_PHOTO
BadgeCondition value is 118.public abstract int getType()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the other badge conditiontrue if the other badge condition has the same type and must also be
resolved;
false otherwisepublic int hashCode()
hashCode in class java.lang.Object