嘿,我正在努力通过 WhatsApp 分享 Base64 图像。在 iOS 和 Android 中,共享的是实际的基数 64,而不是图像。
如果我使用 iMessage 或电子邮件 (iOS),base64 图像将按预期转换并显示。在 Android 中,使用电子邮件进行共享时仅显示 base64 字符串。其他人也面临同样的问题吗?
我正在使用react-native ~0.55.2
import React, { Component } from 'react';
import {Image, Text, StyleSheet, View, Share, Button} from 'react-native';
class ShareClass extends Component {
onClick() {
Share.share({
message: REACT_ICON, //for whats app
url: REACT_ICON, // for other applications
title: 'Wow, did you see that?'
}, {
// Android only:
dialogTitle: 'Share BAM goodness',
})
}
render() {
return (
<View …Run Code Online (Sandbox Code Playgroud)