Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
b01fe9be
提交
b01fe9be
authored
8月 27, 2018
作者:
JarvanMo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
adnroid:修复回调的bug
上级
52890bd3
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
51 行增加
和
73 行删除
+51
-73
AndroidManifest.xml
android/src/main/AndroidManifest.xml
+2
-7
FluwxAuthHandler.kt
.../main/kotlin/com/jarvan/fluwx/handler/FluwxAuthHandler.kt
+2
-1
FluwxResponseHandler.kt
...n/kotlin/com/jarvan/fluwx/handler/FluwxResponseHandler.kt
+2
-0
FluwxWXEntryActivity.kt
...ain/kotlin/com/jarvan/fluwx/wxapi/FluwxWXEntryActivity.kt
+3
-0
AndroidManifest.xml
example/android/app/src/main/AndroidManifest.xml
+13
-2
MainActivity.kt
...p/src/main/kotlin/com/jarvan/fluwxexample/MainActivity.kt
+2
-0
WXEntryActivity.java
...kotlin/com/jarvan/fluwxexample/wxapi/WXEntryActivity.java
+0
-41
WXPayEntryActivity.java
...lin/com/jarvan/fluwxexample/wxapi/WXPayEntryActivity.java
+0
-21
WXEntryActivity.java
...kotlin/net/sourceforge/simcpux/wxapi/WXEntryActivity.java
+11
-0
WXPayEntryActivity.java
...lin/net/sourceforge/simcpux/wxapi/WXPayEntryActivity.java
+8
-0
share_text_image.dart
example/lib/share_text_image.dart
+3
-0
fluwx_class.dart
lib/src/fluwx_class.dart
+5
-1
没有找到文件。
android/src/main/AndroidManifest.xml
浏览文件 @
b01fe9be
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.jarvan.fluwx"
>
package=
"com.jarvan.fluwx"
>
<application>
<application>
<activity
android:name=
".wxapi.FluwxWXEntryActivity"
</application>
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:exported=
"true"
android:screenOrientation=
"sensorPortrait"
android:theme=
"@style/DisablePreviewTheme"
/>
</application>
</manifest>
</manifest>
android/src/main/kotlin/com/jarvan/fluwx/handler/FluwxAuthHandler.kt
浏览文件 @
b01fe9be
package
com.jarvan.fluwx.handler
package
com.jarvan.fluwx.handler
import
com.jarvan.fluwx.constant.WechatPluginKeys
import
com.tencent.mm.opensdk.modelmsg.SendAuth
import
com.tencent.mm.opensdk.modelmsg.SendAuth
import
io.flutter.plugin.common.MethodCall
import
io.flutter.plugin.common.MethodCall
import
io.flutter.plugin.common.MethodChannel
import
io.flutter.plugin.common.MethodChannel
...
@@ -16,6 +16,7 @@ internal object FluwxAuthHandler {
...
@@ -16,6 +16,7 @@ internal object FluwxAuthHandler {
req
.
openId
=
call
.
argument
(
"openId"
)
req
.
openId
=
call
.
argument
(
"openId"
)
}
}
result
.
success
(
WXAPiHandler
.
wxApi
?.
sendReq
(
req
))
result
.
success
(
WXAPiHandler
.
wxApi
?.
sendReq
(
req
))
}
}
...
...
android/src/main/kotlin/com/jarvan/fluwx/handler/FluwxResponseHandler.kt
浏览文件 @
b01fe9be
package
com.jarvan.fluwx.handler
package
com.jarvan.fluwx.handler
import
android.util.Log
import
com.jarvan.fluwx.constant.WeChatPluginMethods
import
com.jarvan.fluwx.constant.WeChatPluginMethods
import
com.jarvan.fluwx.constant.WechatPluginKeys
import
com.jarvan.fluwx.constant.WechatPluginKeys
import
com.tencent.mm.opensdk.modelbase.BaseResp
import
com.tencent.mm.opensdk.modelbase.BaseResp
...
@@ -77,6 +78,7 @@ object FluwxResponseHandler {
...
@@ -77,6 +78,7 @@ object FluwxResponseHandler {
type
to
response
.
type
,
type
to
response
.
type
,
WechatPluginKeys
.
TRANSACTION
to
response
.
transaction
WechatPluginKeys
.
TRANSACTION
to
response
.
transaction
)
)
channel
?.
invokeMethod
(
"onAuthResponse"
,
result
)
channel
?.
invokeMethod
(
"onAuthResponse"
,
result
)
}
}
...
...
android/src/main/kotlin/com/jarvan/fluwx/wxapi/FluwxWXEntryActivity.kt
浏览文件 @
b01fe9be
...
@@ -3,6 +3,7 @@ package com.jarvan.fluwx.wxapi
...
@@ -3,6 +3,7 @@ package com.jarvan.fluwx.wxapi
import
android.app.Activity
import
android.app.Activity
import
android.content.Intent
import
android.content.Intent
import
android.os.Bundle
import
android.os.Bundle
import
android.util.Log
import
com.jarvan.fluwx.handler.FluwxResponseHandler
import
com.jarvan.fluwx.handler.FluwxResponseHandler
import
com.jarvan.fluwx.handler.WXAPiHandler
import
com.jarvan.fluwx.handler.WXAPiHandler
import
com.tencent.mm.opensdk.modelbase.BaseReq
import
com.tencent.mm.opensdk.modelbase.BaseReq
...
@@ -38,7 +39,9 @@ open class FluwxWXEntryActivity:Activity(), IWXAPIEventHandler {
...
@@ -38,7 +39,9 @@ open class FluwxWXEntryActivity:Activity(), IWXAPIEventHandler {
// 第三方应用发送到微信的请求处理后的响应结果,会回调到该方法
// 第三方应用发送到微信的请求处理后的响应结果,会回调到该方法
override
fun
onResp
(
resp
:
BaseResp
)
{
override
fun
onResp
(
resp
:
BaseResp
)
{
FluwxResponseHandler
.
handleResponse
(
resp
)
FluwxResponseHandler
.
handleResponse
(
resp
)
finish
()
}
}
...
...
example/android/app/src/main/AndroidManifest.xml
浏览文件 @
b01fe9be
...
@@ -35,7 +35,18 @@
...
@@ -35,7 +35,18 @@
<category
android:name=
"android.intent.category.LAUNCHER"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
android:name=
".wxapi.WXEntryActivity"
/>
<activity
<activity
android:name=
".wxapi.WXPayEntryActivity"
/>
android:name=
"net.sourceforge.simcpux.wxapi.WXEntryActivity"
android:theme=
"@style/DisablePreviewTheme"
android:exported=
"true"
android:launchMode=
"singleTop"
>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
<data
android:scheme=
"sdksample"
/>
</intent-filter>
</activity>
<activity
android:name=
"net.sourceforge.simcpux.wxapi.WXPayEntryActivity"
/>
</application>
</application>
</manifest>
</manifest>
example/android/app/src/main/kotlin/com/jarvan/fluwxexample/MainActivity.kt
浏览文件 @
b01fe9be
package
com.jarvan.fluwxexample
package
com.jarvan.fluwxexample
import
android.os.Bundle
import
android.os.Bundle
import
net.sourceforge.simcpux.wxapi.WXEntryActivity
import
net.sourceforge.simcpux.wxapi.WXPayEntryActivity
import
io.flutter.app.FlutterActivity
import
io.flutter.app.FlutterActivity
import
io.flutter.plugins.GeneratedPluginRegistrant
import
io.flutter.plugins.GeneratedPluginRegistrant
...
...
example/android/app/src/main/kotlin/com/jarvan/fluwxexample/wxapi/WXEntryActivity.java
deleted
100644 → 0
浏览文件 @
52890bd3
package
com
.
jarvan
.
fluwxexample
.
wxapi
;
import
android.app.Activity
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.widget.Button
;
import
com.tencent.mm.opensdk.modelbase.BaseReq
;
import
com.tencent.mm.opensdk.modelbase.BaseResp
;
import
com.tencent.mm.opensdk.openapi.IWXAPIEventHandler
;
public
class
WXEntryActivity
extends
Activity
implements
IWXAPIEventHandler
{
private
static
final
int
TIMELINE_SUPPORTED_VERSION
=
0x21020001
;
private
Button
gotoBtn
,
regBtn
,
launchBtn
,
checkBtn
,
scanBtn
;
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
}
@Override
protected
void
onNewIntent
(
Intent
intent
)
{
super
.
onNewIntent
(
intent
);
}
@Override
public
void
onReq
(
BaseReq
req
)
{
}
@Override
public
void
onResp
(
BaseResp
resp
)
{
}
}
\ No newline at end of file
example/android/app/src/main/kotlin/com/jarvan/fluwxexample/wxapi/WXPayEntryActivity.java
deleted
100644 → 0
浏览文件 @
52890bd3
package
com
.
jarvan
.
fluwxexample
.
wxapi
;
import
android.app.Activity
;
import
com.jarvan.fluwx.handler.FluwxResponseHandler
;
import
com.tencent.mm.opensdk.modelbase.BaseReq
;
import
com.tencent.mm.opensdk.modelbase.BaseResp
;
import
com.tencent.mm.opensdk.openapi.IWXAPIEventHandler
;
public
class
WXPayEntryActivity
extends
Activity
implements
IWXAPIEventHandler
{
@Override
public
void
onReq
(
BaseReq
baseReq
)
{
}
@Override
public
void
onResp
(
BaseResp
baseResp
)
{
FluwxResponseHandler
.
INSTANCE
.
handleResponse
(
baseResp
);
}
}
example/android/app/src/main/kotlin/net/sourceforge/simcpux/wxapi/WXEntryActivity.java
0 → 100644
浏览文件 @
b01fe9be
package
net
.
sourceforge
.
simcpux
.
wxapi
;
import
com.jarvan.fluwx.wxapi.FluwxWXEntryActivity
;
public
class
WXEntryActivity
extends
FluwxWXEntryActivity
{
}
\ No newline at end of file
example/android/app/src/main/kotlin/net/sourceforge/simcpux/wxapi/WXPayEntryActivity.java
0 → 100644
浏览文件 @
b01fe9be
package
net
.
sourceforge
.
simcpux
.
wxapi
;
import
com.jarvan.fluwx.wxapi.FluwxWXEntryActivity
;
public
class
WXPayEntryActivity
extends
FluwxWXEntryActivity
{
}
example/lib/share_text_image.dart
浏览文件 @
b01fe9be
...
@@ -14,6 +14,7 @@ class _ShareTextPageState extends State<ShareTextPage> {
...
@@ -14,6 +14,7 @@ class _ShareTextPageState extends State<ShareTextPage> {
void
initState
()
{
void
initState
()
{
super
.
initState
();
super
.
initState
();
fluwx
=
new
Fluwx
();
fluwx
=
new
Fluwx
();
}
}
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -84,6 +85,8 @@ class _ShareTextPageState extends State<ShareTextPage> {
...
@@ -84,6 +85,8 @@ class _ShareTextPageState extends State<ShareTextPage> {
transaction:
"text
${DateTime.now().millisecondsSinceEpoch}
"
,
transaction:
"text
${DateTime.now().millisecondsSinceEpoch}
"
,
scene:
scene
scene:
scene
));
));
// fluwx.sendAuth(WeChatSendAuthModel(scope: "snsapi_userinfo",state: "wechat_sdk_demo_test"));
}
}
void
handleRadioValueChanged
(
WeChatScene
scene
){
void
handleRadioValueChanged
(
WeChatScene
scene
){
...
...
lib/src/fluwx_class.dart
浏览文件 @
b01fe9be
...
@@ -38,9 +38,13 @@ class Fluwx {
...
@@ -38,9 +38,13 @@ class Fluwx {
// static Future unregisterApp(RegisterModel model) async {
// static Future unregisterApp(RegisterModel model) async {
// return await _channel.invokeMethod("unregisterApp", model.toMap());
// return await _channel.invokeMethod("unregisterApp", model.toMap());
// }
// }
Fluwx
(){
_channel
.
setMethodCallHandler
(
_handler
);
}
void
listen
()
{
void
listen
()
{
_channel
.
setMethodCallHandler
(
_handler
);
}
}
void
disposeAll
()
{
void
disposeAll
()
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论