简体   繁体   English

我可以从我的Java(或任何语言)应用程序发送WhatsApp消息吗?

[英]Can I send WhatsApp messages from my Java (or any language) applications?

We can send emails or SMS through our application written in Java or many languages. 我们可以通过我们用Java或多种语言编写的应用程序发送电子邮件或短信。 Is there any mechanism to send WhatsApp messages through our applications / web site? 有没有通过我们的应用程序/网站发送WhatsApp消息的机制?

With this code you can open the whatsapp chat with the given number. 使用此代码,您可以使用给定的号码打开whatsapp聊天。

void openWhatsappContact(String number) {
Uri uri = Uri.parse("smsto:" + number);
Intent i = new Intent(Intent.ACTION_SENDTO, uri);
i.setPackage("com.whatsapp");  
startActivity(Intent.createChooser(i, ""));
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从 Java 客户端向我的 Whatsapp 发送消息 - Send message to my Whatsapp from Java Client 如何通过 viber/whatsapp 从 java 发送消息 - How to send messages from java via viber/whatsapp 如何从我的 Android 应用程序通过 WhatsApp 向特定联系人发送消息? - How can I send message to specific contact through WhatsApp from my android app? 从哪里可以得到用Java EE开发的任何示例Web应用程序,以便向他们学习? - From where can I get any example web applications developed in Java EE in order to learn from them? 我无法从我的应用程序将视频分享到whatsapp - I can not share video to whatsapp from my app 如何将简单的消息从网页(HTML / Javascript)发送到Java应用程序? - How can I send simple messages from a webpage (HTML/Javascript) to a Java application? 在其他应用程序运行时,如何防止Java程序滞后? - How can I prevent my Java program from lagging while other applications are running? Java Sockets - 如何将消息发送到多个线程? - Java Sockets - How can I send messages to multiple threads? 为什么我不能使用Ubuntu编译Java应用程序? - Why can't I compile my Java applications using Ubuntu? 如何将消息从Javascript发送到Java? - How do I send messages from Javascript to Java?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM