提交 1e60a767 authored 作者: JarvanMo's avatar JarvanMo

android:add default WXEntryActivity

上级 5c31ef1a
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jarvan.fluwx"></manifest>
package="com.jarvan.fluwx">
<application>
<activity
android:name=".wxapi.FluwxWXEntryActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="true"
android:screenOrientation="sensorPortrait"
android:theme="@style/DisablePreviewTheme" />
</application>
</manifest>
package com.jarvan.fluwx.wxapi
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import com.jarvan.fluwx.handler.FluwxResponseHandler
import com.jarvan.fluwx.handler.WXAPiHandler
import com.tencent.mm.opensdk.modelbase.BaseReq
import com.tencent.mm.opensdk.modelbase.BaseResp
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler
class FluwxWXEntryActivity:Activity(), IWXAPIEventHandler {
// IWXAPI 是第三方app和微信通信的openapi接口
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 onReq(baseReq: BaseReq) {
}
// 第三方应用发送到微信的请求处理后的响应结果,会回调到该方法
override fun onResp(resp: BaseResp) {
FluwxResponseHandler.handleResponse(resp)
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="DisablePreviewTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowIsTranslucent">false</item>
<item name="android:windowDisablePreview">true</item>
</style>
</resources>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论