Congratulations on your code, you did a great job.
I did the installation, put some answers, but when your app responds, it always repeats the same answer 3 times!
View attachment 116428
Hello Dear,
Below is how Whatsapp automation works :
1- It reads the whatsapp notification by implementing a notification listener
2- Once it reads the notification and verifies it that it's from whatsapp, the background service will read the notification text
3- Once the notification text is read then it will search in the SQLlite database for possible reply for that question.
4- Once the reply was found then the accessibility service will be activated and performs the following :
4-1 Open whatsapp by intent
4-2 Send the text or media to sender (contact)
4-3 Press on send button automatically
4-4 it verifies that the message was sent then the accessibility service will close the whatsapp app by clicking on back virtually
Cause of the above problem :
1- Closed the app while the services are still running
2- You opened whatsapp manually
3- Closed whatsapp notification manually
Now the solution to your issue :
Because there is a notification listener and accessibility services meaning it will read all the whatsapp notifications and performs gestures and clicks
so make sure that you only use the device for whatsapp automation app and nothing else.
Meaning you have to have a
separate phone that will be used only for whatsapp automation, because if you interrupt the app then the above problem will occur (sending multiple messages)
Thank you,
Saif