Is it possible to create a listener to get a message from whatsApp in android?
I mean like you have a broadcastReceiver
to listen to incoming SMS in android...
Is any API is needed for that thing, or is it legal thing to do or I need to get any permission from whatsApp
?
Install and open WhatsApp, then verify your number. Tap RESTORE when prompted to restore your chats and media from Google Drive. After the restoration process is complete, tap NEXT. Your chats will be displayed once initialization is complete.
Whatsapp did not publish any official APIs.
There's this open source API for communicating with whatsapp, it's not official and might stop working if Whatsapp update their protocols.
https://github.com/venomous0x/WhatsAPI
Regarding the legality of using this or other non-official API, it depends on the service agreement that you agreed to with Whatsapp. Read it and see if they frown upon using their communication protocols with clients other than theirs. My guess would be they do not allow it.
UPDATE: This GitHub repository seems to have been taken offline due to legal threats.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With