# ActiveStatus

To determine whether the device is activated, it is recommended to call the interface check before activation to avoid repeated activation time consuming.

# Call parameter

No parameter

# Return parameters

attribute Introductions
isActive Whether the device is activated

# sample code

val request = WMPFActiveStatusRequest().apply {
    this.baseRequest = WMPFBaseRequestHelper.checked()
}

val result =
    WMPFIPCInvoker.invokeAsync<IPCInvokerTask_ActiveStatus, WMPFActiveStatusRequest, WMPFActiveStatusResponse>(
        request,
        IPCInvokerTask_ActiveStatus::class.java,
        object : IPCInvokeCallbackEx<WMPFActiveStatusResponse> {
            override fun onBridgeNotFound() {
                it.onError(Exception("bridge not found"))
            }

            override fun onCallback(response: WMPFActiveStatusResponse) {
                if (isSuccess(response)) {
                    it.onSuccess(response)
                } else {
                    it.onError(TaskErrorException(createTaskError(response)))
                }
            }

            override fun onCaughtInvokeException(exception: java.lang.Exception?) {
                if (exception != null) {
                    it.onError(exception)
                } else {
                    it.onError(java.lang.Exception("null"))
                }
            }
        })

if (!result) {
    it.onError(Exception("invoke activeStatus fail"))
}