// License status and errors if found
License.getInstance()
.getStatus()
.isValid(); // returns boolean
License.getInstance()
.getStatus()
.getCode(); // return error code
License.getInstance()
.getStatus()
.getMessage(); // returns a simple descriptive string
License.getInstance().getStatus()
method is the primary mechanism for obtaining the current state of a
license, returning a Status
object. Within this Status
object, the isValid()
method provides a boolean indicator
of whether the license is currently valid. If isValid()
returns false, the system provides a specific error code
and a corresponding error message. This detailed feedback is crucial for accurately diagnosing the reasons
behind an invalid license status, enabling users or developers to understand and address underlying issues
effectively.
License.getInstance().getStatus().getCode()
for the error
code and License.getInstance().getStatus().getMessage()
for the descriptive error message.
// set a listener on license status change
License.getInstance().setStatusChangeListener((status) -> {
// do anything depending on status
});