提交 ad17f891 authored 作者: JarvanMo's avatar JarvanMo

udpate doc

上级 6d17d81a
...@@ -18,8 +18,9 @@ ...@@ -18,8 +18,9 @@
* Share MiniProgram. * Share MiniProgram.
* Send Auth(Login). * Send Auth(Login).
* Pay. * Pay.
* Launch Mini-Program.
## Tech Used In Fluwx ## Libraries Used In Fluwx
For Android,`kotlin-1.2.71` is included: For Android,`kotlin-1.2.71` is included:
```gradle ```gradle
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
......
...@@ -17,6 +17,7 @@ QQ群:892398530。 ...@@ -17,6 +17,7 @@ QQ群:892398530。
* 小程序分享。 * 小程序分享。
* 发送Auth认证(登录)。 * 发送Auth认证(登录)。
* 支付。 * 支付。
* 拉起小程序。
## 技术参数 ## 技术参数
Android部分使用到了`kotlin-1.2.71`。以下是Android部分所涉及到的技术: Android部分使用到了`kotlin-1.2.71`。以下是Android部分所涉及到的技术:
......
## LAUNCH MINI-PROGRAM
`Fluwx` can launch mini-program now.
```dart
import 'package:fluwx/fluwx.dart' as fluwx;
fluwx.launchMiniProgram(
username: "gh_d43f693ca31f"
);
```
\ No newline at end of file
## LAUNCH MINI-PROGRAM
`Fluwx` 现在可以拉起小程序了.
```dart
import 'package:fluwx/fluwx.dart' as fluwx;
fluwx.launchMiniProgram(
username: "gh_d43f693ca31f"
);
```
\ No newline at end of file
...@@ -12,3 +12,6 @@ code to your *info.plist*: ...@@ -12,3 +12,6 @@ code to your *info.plist*:
<true/> <true/>
</dict> </dict>
``` ```
## Can't Launch WeChat on Android?
Check your signature please.
...@@ -12,3 +12,6 @@ iOS 9系统策略更新,限制了http协议的访问,此外应用需要在 ...@@ -12,3 +12,6 @@ iOS 9系统策略更新,限制了http协议的访问,此外应用需要在
<true/> <true/>
</dict> </dict>
``` ```
## Android上无法拉起微信
请检查签名。
\ No newline at end of file
### Response From WeChat ### Response From WeChat
There's some work we have to do on the particular plaform(if you don't need this,just ignore). There's some work we have to do on the particular platform(if you don't need this,just ignore).
### Android ### Android
Fluwx will create `WXEntryActivity`or`WXPayEntryActivity` by itself since *0.4.0*. So the following Fluwx will create `WXEntryActivity`or`WXPayEntryActivity` by itself since *0.4.0*. So the following
...@@ -29,7 +29,7 @@ code isn't necessary. ...@@ -29,7 +29,7 @@ code isn't necessary.
} }
``` ```
~~You can also directly inherit `FluwxWXEntryActivity`,and then you can do nothing. ~~You can also directly inherit `FluwxWXEntryActivity`,and then you can do nothing.
For the rule of creating `WXEntryActivity`and`WXPayEntryActivity`,please read [example wxapi](https://github.com/OpenFlutter/fluwx/tree/master/example/android/app/src/main/kotlin/net/sourceforge/simcpux/wxapi )~~ For the rule of creating `WXEntryActivity` and `WXPayEntryActivity`,please read [example wxapi](https://github.com/OpenFlutter/fluwx/tree/master/example/android/app/src/main/kotlin/net/sourceforge/simcpux/wxapi )~~
~~,never forget to register your Activity in `AndroidManifest.mxl`:~~ ~~,never forget to register your Activity in `AndroidManifest.mxl`:~~
```xml ```xml
<activity <activity
......
...@@ -8,6 +8,7 @@ We'll get a `code` by sending auth: ...@@ -8,6 +8,7 @@ We'll get a `code` by sending auth:
)); ));
``` ```
Getting `access_token` is not supported by `fluwx`. Getting `access_token` is not supported by `fluwx`.
### Return ### Return
The return value of `fluwx.share(model)` is a `Map` The return value of `fluwx.share(model)` is a `Map`
```dart ```dart
......
...@@ -35,6 +35,7 @@ More support will be considered in the future. ...@@ -35,6 +35,7 @@ More support will be considered in the future.
} }
``` ```
### Share Text ### Share Text
```dart ```dart
fluwx.share(WeChatShareTextModel( fluwx.share(WeChatShareTextModel(
...@@ -67,6 +68,7 @@ More support will be considered in the future. ...@@ -67,6 +68,7 @@ More support will be considered in the future.
fluwx.share(model); fluwx.share(model);
``` ```
Two kind of music:`musicUrl``musicLowBandUrl`.They are not coexisting,if both are assigned, only`musicUrl` will be used. Two kind of music:`musicUrl``musicLowBandUrl`.They are not coexisting,if both are assigned, only`musicUrl` will be used.
### Share Video ### Share Video
```dart ```dart
var model = new WeChatShareVideoModel( var model = new WeChatShareVideoModel(
...@@ -80,11 +82,12 @@ Two kind of music:`musicUrl`和`musicLowBandUrl`.They are not coexisting,if ...@@ -80,11 +82,12 @@ Two kind of music:`musicUrl`和`musicLowBandUrl`.They are not coexisting,if
fluwx.share(model); fluwx.share(model);
``` ```
Two kind of video:`videoUrl``videoLowBandUrl`.They are not coexisting,if both are assigned, only `videoUrl` will be used. Two kind of video:`videoUrl``videoLowBandUrl`.They are not coexisting,if both are assigned, only `videoUrl` will be used.
### Share Mini Program ### Share Mini Program
```dart ```dart
var model =new WeChatShareMiniProgramModel( var model =new WeChatShareMiniProgramModel(
webPageUrl: _webPageUrl, webPageUrl: _webPageUrl,
miniProgramType: WeChatShareMiniProgramModel.MINI_PROGRAM_TYPE_RELEASE, miniProgramType:fluwx.WXMiniProgramType.RELEASE,
userName: _userName, userName: _userName,
title: _title, title: _title,
description: _description, description: _description,
...@@ -92,7 +95,4 @@ Two kind of video:`videoUrl`和`videoLowBandUrl`.They are not coexisting,if bo ...@@ -92,7 +95,4 @@ Two kind of video:`videoUrl`和`videoLowBandUrl`.They are not coexisting,if bo
); );
fluwx.share(model); fluwx.share(model);
``` ```
`miniProgramType` only suports the following values:
* MINI_PROGRAM_TYPE_RELEASE
* MINI_PROGRAM_TYPE_TEST
* MINI_PROGRAM_TYPE_PREVIEW
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
```dart ```dart
var model =new WeChatShareMiniProgramModel( var model =new WeChatShareMiniProgramModel(
webPageUrl: _webPageUrl, webPageUrl: _webPageUrl,
miniProgramType: WeChatShareMiniProgramModel.MINI_PROGRAM_TYPE_RELEASE, miniProgramType: fluwx.WXMiniProgramType.RELEASE,
userName: _userName, userName: _userName,
title: _title, title: _title,
description: _description, description: _description,
...@@ -94,7 +94,3 @@ ...@@ -94,7 +94,3 @@
); );
fluwx.share(model); fluwx.share(model);
``` ```
`miniProgramType`仅支持三种:
* MINI_PROGRAM_TYPE_RELEASE
* MINI_PROGRAM_TYPE_TEST
* MINI_PROGRAM_TYPE_PREVIEW
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论