Android Question Need to build simple program communicate with Whatsapp (Compatible for text msg only)

Adamdam

Active Member
Licensed User
Longtime User
Dear All,

Greetings,

I need to build program instead of the whatsapp in my mobile.
I need to make my program, receive "Text" messages instead of my whatsapp, my program later will analysis this text message to make some things.

also, need to transmite direct from my program to certain number(s) from my whatsapp friends. Direct from my program, say now when click in one button send "hello" to my brother , and click in other button will send "xxx" to him directly, like what happen in whatsapp program now.
In other word need to build whatsapp compatible program,

I hope later also to make this program work in background and give alert notification when receive message from other side run normal whatsapp program.

Thanks in advance for all.
 

MarkusR

Well-Known Member
Licensed User
Longtime User
i read whatsapp did not provide a communication api, but i saw there exist online services to send messages to whatsapp messenger.
for communication between our apps i think its necessary to have a server/app 24/7 online.
you can use server hosting or if you not have much traffic you can run a raspberry pi at home. (raspberry save electricity costs and is a very small device)
in b4a app i would use okhttputils2 or (web)socket and a local notification (independent from google cloud services), a service in b4a can run in foreground or background mode.

https://www.b4x.com/android/forum/threads/server-send-and-receive-objects.37206/#post-219237
 
Last edited:
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
i believe the intent system use a installed whatsapp app but there you must click the send button by your self. i guess its not what you want.
by online services i meant there are people in web that know how this message protocol works and offer this as paid service via web api/php to send to whatsapp.
the problem is if whatsapp open a web api to send messages to her clients its untrusted and a risk. people will get anonymous spam or bot messages.
example for facebook marked place some weeks ago, a bot contacted me, it was really annoying. so now everybody get math tasks from me first.
 
Upvote 0

Adamdam

Active Member
Licensed User
Longtime User
Many thanks for Mr. Markus, and Mr. tigrot.

I find API that enable me to send "Whatsapp Msg" from VBA, PHP, ... to normal whatsapp user like in this link
https://whatsmate.github.io/2017-02-04-send-whatsapp-m-vba/

It accepted somehow to start, ( later hope to send msg from b4a, if you have conversion for the code in previous site).

But, I need the reverse direction, i.e. receive messages instead of whatsapp (some name it as whatsapp listener).

Thanks in advance for all.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…