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.