WhatsApp Broadcast

Star-Dust

Expert
Licensed User
Longtime User

DonManfred

Expert
Licensed User
Longtime User
Interface to WhatsApp Messenger

> END OF SUPPORT <

Do not expect it to work in 2019
 

MODERN TALKING

Active Member
Licensed User
Longtime User
Das ist gut. I try it. Seems complicated - so might need a few days

Can Klopp replace Loew?
 

DonManfred

Expert
Licensed User
Longtime User
Can Klopp replace Loew?
NO ONE is interested in this.
This is the wronh thread for such question.
This forum is about B4X Products. Every other discussion should be done in chitchat forum.

If you feel to ask the question; create a Thread in the Chitchat forum.
 

DaniDPX

Member
Licensed User
Hi guys,

Sending Broadcast Message:

B4X:
$targets = array("34123456789", "34987654321");
$message = "This is broadcast message";
$w->sendBroadcastMessage($targets, $message);

https://github.com/mgp25/Chat-API/wiki/WhatsAPI-Documentation

Please can some kind soul port this to B4A?

Reward is USD 50 - if it works :D

THANK YOU


Hi @Rockefeller Goldman as of my understanding, from B4A you can send a broadcast message via intents to WhatsApp with the following code. But WhatsApp will force you to choose for list of contacts. (You may check the following code snippet below). If you need to send broadcast message through another API that can talk to whatsApp on behalf of your B4A app, that is different and I believe in your case automating such thing is possible with such option. I may help you to build custom API with Sample B4A App.

B4X:
Sub Activity_Create(FirstTime As Boolean)
  
    Dim message As String = "This is broadcast message"
  
    Dim Intent1 As Intent
    Intent1.Initialize(Intent1.ACTION_SEND ,"")
    Intent1.SetType("text/plain")
    Intent1.SetComponent("com.whatsapp/.ContactPicker")
    Intent1.PutExtra("android.intent.extra.TEXT", message)
    StartActivity(Intent1)
  
'    Whatsapp: intent.setPackage("com.whatsapp");
'    Linkedin: intent.setPackage("com.linkedin.android");
'    Twitter: intent.setPackage("com.twitter.android");
'    Facebook: intent.setPackage("com.facebook.katana");
'    GooglePlus: intent.setPackage("com.google.android.apps.plus");
End Sub
 

Star-Dust

Expert
Licensed User
Longtime User
Das ist gut. I try it. Seems complicated - so might need a few days

Can Klopp replace Loew?
You're wrong is simple enough.

I made a BOT, I read the messages of WhatsApp with NotifierListen and automatically reply with AccessService .....

Everything is if you are really interested in making it ....
 

Star-Dust

Expert
Licensed User
Longtime User
Hi @Rockefeller Goldman as of my understanding, from B4A you can send a broadcast message via intents to WhatsApp with the following code. But WhatsApp will force you to choose for list of contacts. (You may check the following code snippet below). If you need to send broadcast message through another API that can talk to whatsApp on behalf of your B4A app, that is different and I believe in your case automating such thing is possible with such option. I may help you to build custom API with Sample B4A App.

B4X:
Sub Activity_Create(FirstTime As Boolean)
 
    Dim message As String = "This is broadcast message"
 
    Dim Intent1 As Intent
    Intent1.Initialize(Intent1.ACTION_SEND ,"")
    Intent1.SetType("text/plain")
    Intent1.SetComponent("com.whatsapp/.ContactPicker")
    Intent1.PutExtra("android.intent.extra.TEXT", message)
    StartActivity(Intent1)
 
'    Whatsapp: intent.setPackage("com.whatsapp");
'    Linkedin: intent.setPackage("com.linkedin.android");
'    Twitter: intent.setPackage("com.twitter.android");
'    Facebook: intent.setPackage("com.facebook.katana");
'    GooglePlus: intent.setPackage("com.google.android.apps.plus");
End Sub
It works partially. There is a library of @MarcoRome that uses this system (see here), but user intervention is still required.

If you set up a standard message (by code), you need to select the users one by one.
If you set the user (by code), you can not set a standard message .. he opens an panel to confirm the message.

On the forum you can find everything and on the official website of WhastApp there is a documentation (not complete) of some APIs
 

MODERN TALKING

Active Member
Licensed User
Longtime User
Thank you Dani :)

With your solution can AUTOMATE selection of users to Broadcast to? Non-manual selection - but with their ContactName or PhoneNumber
 

MODERN TALKING

Active Member
Licensed User
Longtime User
You're wrong is simple enough.

I made a BOT, I read the messages of WhatsApp with NotifierListen and automatically reply with AccessService .....

Everything is if you are really interested in making it ....

Yes Star-Dust, trying it for sure!!

Thank you for the encouragement - you're a swell dude ;)
 

DaniDPX

Member
Licensed User
Thank you Dani :)

With your solution can AUTOMATE selection of users to Broadcast to? Non-manual selection - but with their ContactName or PhoneNumber

As per the ChatAPI you attached on Post#1, It is possible to send broadcast message. but make sure not to use it for spamming. They clearly mentioned it on terms and condition section. What required for this will be having a custom API hosted somewhere having ChatAPI and your B4X app can talk to it to send the messages.
 

MODERN TALKING

Active Member
Licensed User
Longtime User
As per the ChatAPI you attached on Post#1, It is possible to send broadcast message. but make sure not to use it for spamming. They clearly mentioned it on terms and condition section. What required for this will be having a custom API hosted somewhere having ChatAPI and your B4X app can talk to it to send the messages.

Isn't it allowed to send tons of messages as a Broadcast IF the recipient has your phonenumber in their Contacts?
 

moster67

Expert
Licensed User
Longtime User
With Accessibility services you can easily integrate with Whatsapp, automate most things such as reading incoming messages, replying to them, sending messages to users or groups, with or without attachments, creating a bot etc.

Wrote some automation stuff for another user here on the forum and it works fine

Just study the code and only the sky is the limit. Just be careful to use the code and your actions in a proper way or else you will likely see your phone number be banned either temporarily or definitely by Whatsapp
 
Last edited:
Top