提交 0cd95342 authored 作者: JarvanMo's avatar JarvanMo

update doc

上级 02d095fd
...@@ -57,6 +57,7 @@ However, developers must care about the following points: ...@@ -57,6 +57,7 @@ However, developers must care about the following points:
)); ));
``` ```
## Share Image ## Share Image
```dart ```dart
fluwx.share(WeChatShareImageModel( fluwx.share(WeChatShareImageModel(
image: _imagePath, image: _imagePath,
...@@ -67,6 +68,19 @@ However, developers must care about the following points: ...@@ -67,6 +68,19 @@ However, developers must care about the following points:
``` ```
> NOTE:`Fluwx` will create thumbnail from `image` if thumbnail isn't provided. > NOTE:`Fluwx` will create thumbnail from `image` if thumbnail isn't provided.
Well,let's talk about sharing big images on Android,if the image you want to share is smaller than 512k (the truth is the data passed through
`Intent` must be smaller than 512k), everything works well.However, if it's bigger than
512k, take care the following permission:
```xml
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
```
`Fluwx` can't share big images without the permission above because these images will stored in:
```kotlin
context.getExternalCacheDir()
```
Why? Because the limit of `Intent`. If someone knows a better solution,just PR or tell me.
## Share Music ## Share Music
```dart ```dart
var model = WeChatShareMusicModel( var model = WeChatShareMusicModel(
......
...@@ -57,6 +57,20 @@ ...@@ -57,6 +57,20 @@
> 注意:如果不指定 `thumbnail`,那么`Fluwx`将尝试从`image`中获取缩略图。 > 注意:如果不指定 `thumbnail`,那么`Fluwx`将尝试从`image`中获取缩略图。
好吧,让我们谈谈在Android上分享大图,如果说你要分享的图片小于512k(实际上是因为`Intent`传值是不能超过512k的),一切都可以正常工作。
但是如果你要分享的图片大于512k,那么请保证你的app有以下的权限:
```xml
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
```
如果`Fluwx`没有以上的权限,那么是无法完成分享的,因为要分享的图片将会被存储在以下位置:
```kotlin
context.getExternalCacheDir()
```
为什么? 因为`Intent`有限制. 如果有人知道更好的解决方案,请直接PR或者告诉我。
## 分享音乐 ## 分享音乐
```dart ```dart
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论