I have seen few applications on play store that supports automatic reply for WhatsApp, I searched the internet to find out the approach, but all I found was this piece of code
Uri uri = Uri.parse("smsto:" + "99********");
Intent i = new Intent(Intent.ACTION_SENDTO, uri);
i.putExtra("sms_body", "Hey!");
i.setPackage("com.whatsapp");
startActivity(i);
It will open the WhatsApp and take you to that particular contact if you have saved and it will paste the given text but it will not send the message.
links
https://play.google.com/store/apps/details?id=horizontstack.autoreplyforwhatsapp.whatsreply
They are accessing the notifications to get the messages. I want to know how they are sending the messages in the background without opening the application. If somebody knows the approach please share here.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…