Android Question Embedded Browser and Injecting JS code

EduardoElias

Well-Known Member
Licensed User
Longtime User
Hi there,

I have found that I can create a "bot" for whatsapp if I inject JS code in a running whatsapp web page.

My question here is for those experienced with browser and B4A

linke this https://github.com/bruno222/whatsapp-web-bot

I tested on a chrome browse and it worked well, sure you have to open whatsapp and inject using the console the code above.

What i am asking is that if someone know how to do the same open whatsapp in a embeded browser in B4A and then inject the JS code.

DISCLAIMER : my intention is NOT spam or marketing. I have a POS system and I want to help the process of delivery communicating with the POS software that is B4A; Using whatsapp for spam or other cases can ban the account quickly. It is solely for the use of the store and for its contacts that are a few.
 

KMatle

Expert
Licensed User
Longtime User
Even you only want to know how to do that... Please DON'T because it is not legal and either WhatsApp AND Google will bann you if you are going to inject js code from an app to get control over other apps (or even remote). Users will eventually sue you for that (privacy, etc.).

However: If you need a communication solution for you customers (I wonder what a POS system has to do with it, maybe for backups) there are tons of easy solutions

Examples:

a) get an own cheap hosted server and send/receive whatever you need and store it in a database and get it from there (via OkHttpUtils or RDC or whatever)
b) use Firebase Messaging to communicate (WhatsApp, Messenger and all other apps use it, too)
c) use a B4J/B4A solution on a local network (with Sockets and AsyncStreams and SQLite)

Very easy to create an OWN app like WhatsApp.
 
Upvote 0

EduardoElias

Well-Known Member
Licensed User
Longtime User
(I wonder what a POS system has to do with it, maybe for backups) there are tons of easy solutions

thank you for your time....

The problem is that a lot of stores down here are using whatsapp as a tool to comunicate with their customers and doing delivery orders!!!

But it is a mess... a mess that brings money to them, and they are looking for a way to help this. If I could read the messages and provide a simple menu system to guide the customer to place a order would make a giant difference. Maybe this does not make sense in other countries, but in Brazil there is a huge base of stores benefiting from this.

I was somewhat seeing possibilities to help improve on that. Some tried, but they use unique phone numbers and huge amount of contacts, that is a problem, I want to bring that as a helper for the local store and their 100 or so customers.
 
Upvote 0
Top