react-native-share-local
react-native-share-local copied to clipboard
react-native 调用系统原生分享
APP的targetSdkversion由23改成26后,调用分享,APP闪退。
```js sharePictures({ imagesUrl: ['https://statics.seatent.com/statics/99cea281725792cfefc2737e7f5ecb3d/attachment/upload/image/20181214/54e5b1acd78a41b5acaf77daece2a4d1.jpg'], callback: (error) => { if (!error) { alert('这是回调方法'); } } }); ``` 
import {NativeModules,Platform,CameraRoll} from 'react-native' import RNFS from 'react-native-fs'; const Md5 = require('md5'); const shareLocal = NativeModules.RNShareLocal
启动后直接闪退,因此查看不到错误信息,自动和手动配置都已尝试。 Android 异常 机器:荣耀畅玩7A react-native: 0.56.0 iOS 正常
android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/com.test/cache/0.jpg exposed beyond app through ClipData.Item.getUri() at android.os.StrictMode.onFileUriExposed(StrictMode.java:1975)
比如分享图片只出来了图片 其中subject message winTitle没显示出来,链接跟文本分享也一样 react native ^ 0.51.0 react ^ 16.0.0 ` intent.putExtra(Intent.EXTRA_SUBJECT,subject); intent.putExtra(Intent.EXTRA_TEXT, message); intent.putExtra(Intent.EXTRA_STREAM, uris); intent.putExtra ("Kdescription", message); intent.setType("image/*"); Intent chooser = Intent.createChooser(intent, winTitle);`