嗨,我们在我们的应用程序中使用以下库,它在 Android 和 iOS 中运行良好,但在华为设备中 Share.open() 不返回任何内容。
这是我们用来分享一些文本的库。
import Share from "react-native-share";
const message = "Text to share";
Share.open({
message,
}).then((res) => {
console.log(res);
return true;
}).catch((err) => {
console.log("Exception: ", err);
return false;
});
在华为设备中,它确实打开了共享对话框,我可以选择任何应用程序来共享消息,回到我们的应用程序后,应用程序逻辑无法继续,因为承诺没有返回任何值。
我在只有 HMS 可用的华为 P40Pro 设备上进行测试。但是,即使同时具有 HMS 和 GMS 的设备也存在相同的问题。
感谢您对此的任何帮助。