I need to open the WhatsApp chat window to a specific number without passing a message in the intent
I tried to remove the sendIntent.putExtra(Intent.EXTRA_TEXT, userText)
but didn't help, when I send from the app it says
"Can't send empty message"
Here is the complete code
val sendIntent = Intent("android.intent.action.MAIN")
sendIntent.action = Intent.ACTION_SEND
sendIntent.setPackage("com.whatsapp")
sendIntent.type = "text/plain"
sendIntent.putExtra("jid", number + "@s.whatsapp.net")
sendIntent.putExtra(Intent.EXTRA_TEXT, userText)
startActivity(sendIntent)