Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
f1cb53ab
提交
f1cb53ab
authored
4月 12, 2021
作者:
JarvanMo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update demo
上级
304eafc4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
54 行增加
和
9 行删除
+54
-9
FluwxPlugin.kt
android/src/main/kotlin/com/jarvan/fluwx/FluwxPlugin.kt
+1
-1
LAUNCH_APP_FROM_H5.md
doc/LAUNCH_APP_FROM_H5.md
+20
-2
LAUNCH_APP_FROM_H5_CN.md
doc/LAUNCH_APP_FROM_H5_CN.md
+22
-3
AndroidManifest.xml
example/android/app/src/main/AndroidManifest.xml
+11
-3
没有找到文件。
android/src/main/kotlin/com/jarvan/fluwx/FluwxPlugin.kt
浏览文件 @
f1cb53ab
...
@@ -50,7 +50,7 @@ class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,PluginRegist
...
@@ -50,7 +50,7 @@ class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,PluginRegist
private
fun
handelIntent
(
intent
:
Intent
?){
private
fun
handelIntent
(
intent
:
Intent
?){
val
action
=
intent
?.
action
val
action
=
intent
?.
action
val
dataString
=
intent
?.
dataString
val
dataString
=
intent
?.
dataString
if
(
Intent
.
ACTION_VIEW
.
equals
(
action
)
)
{
if
(
Intent
.
ACTION_VIEW
==
action
)
{
extMsg
=
dataString
extMsg
=
dataString
}
}
}
}
...
...
doc/LAUNCH_APP_FROM_H5.md
浏览文件 @
f1cb53ab
...
@@ -6,6 +6,14 @@ For Android side, you need add the following action for your FlutterActivity in
...
@@ -6,6 +6,14 @@ For Android side, you need add the following action for your FlutterActivity in
<action android:name="${applicationId}.FlutterActivity" />
<action android:name="${applicationId}.FlutterActivity" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="${applicationId}"
android:path="/"
android:scheme="wechatextmsg" />
</intent-filter>
```
```
At the same time, you also need to add
`<meta-data>`
in application which used to store your WeChat AppId:
At the same time, you also need to add
`<meta-data>`
in application which used to store your WeChat AppId:
...
@@ -45,5 +53,15 @@ Please add the following queries in your app's `AndroidManifest.xml`:
...
@@ -45,5 +53,15 @@ Please add the following queries in your app's `AndroidManifest.xml`:
</intent>
</intent>
</queries>
</queries>
```
```
## IOS
Please register your WXApi in your
`AppDelegate`
:
```
oc
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//向微信注册
[WXApi registerApp:APP_ID
universalLink:UNIVERSAL_LINK];
return YES;
}
```
> For details, please read the example.
> If you want to get ext from website, please call ``fluwx.getExtMsg()`。`For details, please read the example.
\ No newline at end of file
\ No newline at end of file
doc/LAUNCH_APP_FROM_H5_CN.md
浏览文件 @
f1cb53ab
...
@@ -2,9 +2,17 @@
...
@@ -2,9 +2,17 @@
Fluwx 支持从
`<wx-open-launch-app>`
启动你的app, 并且支持传递
`extInfo`
给你的app.
Fluwx 支持从
`<wx-open-launch-app>`
启动你的app, 并且支持传递
`extInfo`
给你的app.
对于Android来说,你要在
`AndroidManifest.xml`
中给你的
`Activity`
加上一个标签:
对于Android来说,你要在
`AndroidManifest.xml`
中给你的
`Activity`
加上一个标签:
```
```
<intent-filter>
<action android:name="${applicationId}.FlutterActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<intent-filter>
<action android:name="
${applicationId}.FlutterActivity
" />
<action android:name="
android.intent.action.VIEW
" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="${applicationId}"
android:path="/"
android:scheme="wechatextmsg" />
</intent-filter>
</intent-filter>
```
```
...
@@ -46,4 +54,16 @@ Fluwx 支持从`<wx-open-launch-app>`启动你的app, 并且支持传递`extInfo
...
@@ -46,4 +54,16 @@ Fluwx 支持从`<wx-open-launch-app>`启动你的app, 并且支持传递`extInfo
</queries>
</queries>
```
```
> 更多信息请参考example.
## IOS
\ No newline at end of file
请在你的
`AppDelegate`
中主动注册
`WXApi`
```
oc
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//向微信注册
[WXApi registerApp:APP_ID
universalLink:UNIVERSAL_LINK];
return YES;
}
```
> 如你想主动获取从网页传进来的值 ,请主动调用`fluwx.getExtMsg()`。更多信息请参考example.
example/android/app/src/main/AndroidManifest.xml
浏览文件 @
f1cb53ab
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<action
android:name=
"${applicationId}.FlutterActivity"
/>
<action
android:name=
"${applicationId}.FlutterActivity"
/>
</intent>
</intent>
</queries>
</queries>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<application
<application
android:name=
"io.flutter.app.FlutterApplication"
android:name=
"io.flutter.app.FlutterApplication"
android:icon=
"@mipmap/ic_launcher"
android:icon=
"@mipmap/ic_launcher"
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
android:value=
"12345678"
/>
android:value=
"12345678"
/>
<meta-data
<meta-data
android:name=
"handleWeChatRequestByFluwx"
android:name=
"handleWeChatRequestByFluwx"
android:value=
"true"
/>
android:value=
"true"
/>
<activity
<activity
android:name=
".MainActivity"
android:name=
".MainActivity"
...
@@ -39,6 +39,14 @@
...
@@ -39,6 +39,14 @@
<action
android:name=
"${applicationId}.FlutterActivity"
/>
<action
android:name=
"${applicationId}.FlutterActivity"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
</intent-filter>
</intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
<data
android:host=
"${applicationId}"
android:path=
"/"
android:scheme=
"wechatextmsg"
/>
</intent-filter>
</activity>
</activity>
<!-- Don't delete the meta-data below.
<!-- Don't delete the meta-data below.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论