【问题标题】:Linking to sms app with url body使用 url 正文链接到短信应用
【发布时间】:2018-12-06 12:54:30
【问题描述】:

当我想使用 Linking.openURL 共享 url 时出现错误,短信应用在 & 之后切断了我的 url:

这是我的网址app://into/app/?bar=true&footer=1234&lorem=51 而短信应用收到这个urlbestest://into/app/?bar=true没有出现第二个参数。

【问题讨论】:

  • 查询字符串参数使用:encodeURIComponent("bar=true&footer=1234&lorem=51");

标签: javascript html reactjs react-native


【解决方案1】:

如果您打算使用包含 URL 和一些其他数据的正文为您的用户打开默认的消息传递应用程序,您可能需要查看名为 react-native-communicationsthis package

text(phoneNumber, body)

phoneNumber - String
body - String

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-09-26
    • 1970-01-01
    • 2017-01-22
    • 2012-04-24
    • 2021-05-23
    • 1970-01-01
    • 1970-01-01
    • 2012-03-15
    相关资源
    最近更新 更多