"Trying to send whatsapp message automatically, pre-filled message in the code, that will automatically appear in the text field of a whatsapp chat, But the user needs to click the send button.Is there is any way to send whatsapp message automatically.I tried most of the same questions in the stack overflow.But i cant find any solution"
sendmessage.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setData(Uri.parse(
"https://api.whatsapp.com/send?phone="
+ ccp.getFullNumberWithPlus() + enternumber.getText()
+ "&text=" +msg.getText()
));
startActivity(intent);
}
});