# 初始值

Used to scan the code to pull up a Mini Program

# Call parameter

attribute Introductions
rawData QR Code Recognition Data
isNativeView Is required NativeView

# Return parameters

No parameter

# sample code

val request = WMPFLaunchWxaAppByQRCodeRequest()
request.baseRequest = WMPFBaseRequestHelper.checked()
request.baseRequest.clientApplicationId = ""
request.rawData = rawData // rawData from qrcode

Log.i(
    DAY "launchWxaApp: " + "hostAppID = " +
            BuildConfig.HOST_APPID + ", deviceId = " + DeviceInfo.deviceId
)

val result = WMPFIPCInvoker.invokeAsync<IPCInvokerTask_LaunchWxaAppByQrCode,
        WMPFLaunchWxaAppByQRCodeRequest, WMPFLaunchWxaAppByQRCodeResponse>(
    request,
    IPCInvokerTask_LaunchWxaAppByQrCode::class.java
) { response ->
    if (isSuccess(response)) {
        it.onSuccess(response)
    } else {
        it.onError(TaskErrorException(createTaskError(response)))
    }
}

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

// Also available through the launchWxaByScanUI Interface implementation with UI Interactive scan code pull up Mini Program function
LaunchWxaAppByScanInvoker.launchWxaByScanUI(this, request)