How to broadcast a message from my own app to contacts on WhatsApp?

为君一笑 提交于 2019-12-12 09:26:18

问题


Now i can send a message from my app to whatsapp by this shown code..BUT how to send to many contacts at one time

Intent waIntent = new Intent(Intent.ACTION_SEND);
            waIntent.setType("text/plain");
                    String text = "Sorry For Interruption,I'm Just Trying Something";
            waIntent.setPackage("com.whatsapp");
            if (waIntent != null) {
                waIntent.putExtra(Intent.EXTRA_TEXT, text);//
            startActivity(Intent.createChooser(waIntent,"Share with"));

回答1:


You can't. WhatsApp allows the user to pick only one contact or pre-existing group at a time, and you cannot change that in any way.



来源:https://stackoverflow.com/questions/17370965/how-to-broadcast-a-message-from-my-own-app-to-contacts-on-whatsapp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!