# CloseWxaApp
For closing the Mini Program
# Call parameter
attribute | Introductions |
---|---|
appId | Of the Mini Program to close appId |
keepRunning | for true When the Mini Program is only cut the background, not directly destroyedfor false The Mini Program instance is destroyed when the. default false。 |
# Return parameters
No parameter
# sample code
val request = WMPFCloseWxaAppRequest()
request.baseRequest = WMPFBaseRequestHelper.checked()
request.baseRequest.clientApplicationId = ""
request.appId = appId
val result = WMPFIPCInvoker.invokeAsync<IPCInvokerTask_CloseWxaApp,
WMPFCloseWxaAppRequest, WMPFCloseWxaAppResponse>(
request,
IPCInvokerTask_CloseWxaApp::class.java
) { response ->
if (isSuccess(response)) {
it.onSuccess(response)
} else {
it.onError(TaskErrorException(createTaskError(response)))
}
}
if (!result) {
it.onError(Exception("invoke closeWxaApp fail"))
}