提交 698e87b8 authored 作者: JarvanMo's avatar JarvanMo

update RESPONSE docs

上级 d99fea68
...@@ -4,8 +4,25 @@ There's some work we have to do on the particular plaform(if you don't need this ...@@ -4,8 +4,25 @@ There's some work we have to do on the particular plaform(if you don't need this
### Android ### Android
For`Android`,create `WXEntryActivity`or`WXPayEntryActivity`,and override the following function: For`Android`,create `WXEntryActivity`or`WXPayEntryActivity`,and override the following function:
```kotlin ```kotlin
public override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
WXAPiHandler.wxApi?.handleIntent(intent, this)
}
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
setIntent(intent)
WXAPiHandler.wxApi?.handleIntent(intent, this)
}
override fun onResp(resp: BaseResp) { override fun onResp(resp: BaseResp) {
FluwxResponseHandler.handleResponse(resp) FluwxResponseHandler.handleResponse(resp)
finish()
} }
``` ```
You can also directly inherit `FluwxWXEntryActivity`,and then you can do nothing. You can also directly inherit `FluwxWXEntryActivity`,and then you can do nothing.
......
...@@ -4,8 +4,25 @@ ...@@ -4,8 +4,25 @@
### Android ### Android
由于机制问题,`Android`端需要在`WXEntryActivity``WXPayEntryActivity`中添加如下代码: 由于机制问题,`Android`端需要在`WXEntryActivity``WXPayEntryActivity`中添加如下代码:
```kotlin ```kotlin
public override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
WXAPiHandler.wxApi?.handleIntent(intent, this)
}
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
setIntent(intent)
WXAPiHandler.wxApi?.handleIntent(intent, this)
}
override fun onResp(resp: BaseResp) { override fun onResp(resp: BaseResp) {
FluwxResponseHandler.handleResponse(resp) FluwxResponseHandler.handleResponse(resp)
finish()
} }
``` ```
你也可以直接继承`FluwxWXEntryActivity` 你也可以直接继承`FluwxWXEntryActivity`
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论