android - 在 Android 上使用 Whatsapp url scheme

标签 android iphone url instant-messaging whatsapp

我正在尝试在 Web 应用程序中使用 WhatsApp url 方案。我正在使用适用于 iOS 的 url 方案的 WhatsApp 文档,详情如下:http://www.whatsapp.com/faq/en/iphone/23559013

点击以下网址时: whatsapp://send?text=你好

在 iPhone 上,这会打开手机的 WhatsApp 应用程序。然而,在 Android 上,它只是在 Google 中查找此 url,而不会激活 WhatsApp 应用程序。

是否有适用于 android 的 url 方案?是否需要做一些不同的事情/对代码进行一些更改,以使其也能在 Android 上运行?

如何从浏览器以适用于 iOS 和 Android 的方式在 whatsapp 中共享 url?

最佳答案

Android URL Scheme 似乎与 iOS 相同

WhatsApp provides a custom URL scheme to interact with WhatsApp:

If you have a website and want to open a WhatsApp chat with a pre-filled message, you can use our custom URL scheme to do so. Opening whatsapp://send?text= followed by the text to send, will open WhatsApp, allow the user to choose a contact, and pre-fill the input field with the specified text.

Checkout the official Android documentation

关于android - 在 Android 上使用 Whatsapp url scheme,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19523873/

相关文章:

android - FragmentStatePagerAdapter 是否在方向更改时保存 fragment 状态?

java - Android如何更新,但保留数据库信息

iphone - Xcode 组织者 : Valid signing identity not found

iphone - 基于标签栏的应用程序非常奇怪的 iPhone 应用程序崩溃问题

url - 在 URL 中加入 RESTful 服务,构建 URL 路径

python - 给定一个文本文件的 URL,读取包含大量数据的文本文件内容的最简单方法是什么?

未应用 Android 自定义工具栏主题

javascript - 在 HTML5 应用程序中使用 IFRAME

cocoa - 如何使用 Cocoa 将 URL 关联到应用程序

android - 为什么这些 TD 元素中的字体以不同的大小呈现?