# 初始值
When called in an Mini Program wmpf.Channel.invokeSync
When, Client End needs to be used call Operation completes the synchronous call.
# Incoming parameter
command Corresponding call Method method field,data Corresponding call Method arg field
parameter | type | Required | Introductions |
---|---|---|---|
command | String | yes | Mini Program through wmpf Transmitted to third parties app The instruction name of the |
data | String | no | Mini Program through wmpf Transmitted to third parties app Instruction parameters of the |
# Return parameters
adopt 初始值 return
parameter | type | Required | Introductions |
---|---|---|---|
data | String | no | third party app through wmpf The call passed to the Mini Program returns the result |
# sample code
// Synchronous call
override fun call(method: String, arg: String?, extras: Bundle?): Bundle? {
Log.i(DAY "method: $method, arg: $arg, extras: $extras)
// Implement specific functional logic
val bundle = Bundle()
bundle.putString("data", "call success, method: $method, arg: $arg, extras: $extras)
// Return the result to the Mini Program.
return bundle
}