【问题标题】:start whatsapp with android.content.Intent.ACTION_SENDTO使用 android.content.Intent.ACTION_SENDTO 启动 whatsapp
【发布时间】:2011-06-08 19:19:47
【问题描述】:

我正在尝试使用 android 意图启动 whatsapp:

String uri = "smsto:+123456";
Intent messageIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse(uri));
messageIntent.putExtra("sms_body", "My Message");
startActivity(messageIntent);

如果用户选择正常的消息传递应用程序,效果会很好。但如果用户从选择器中选择了whatsapp,则不会。 whatsapp 的“撰写文本字段”仍然为空。

我在这里做错了什么?我需要另一个putExtra()吗?

【问题讨论】:

  • 你问过whatsapp背后的开发者吗?
  • 没有。让我这样做。我会回来报告的。

标签: android android-intent uri messaging whatsapp


【解决方案1】:

这是来自 whatsapp android 支持团队的答案:

【讨论】:

  • 哈哈好笑
猜你喜欢
  • 2016-02-11
  • 2021-05-31
  • 1970-01-01
  • 1970-01-01
  • 2014-02-25
  • 2022-10-17
  • 2021-10-31
  • 2019-08-17
  • 1970-01-01
相关资源
最近更新 更多