I am using this code to call WhatsApp directly from my Call Logs app. This works well, but only if the phone number includes a valid country code. For example calling WhatsApp
WhatsApp for an specific phone number
val whatsAppIntent = Intent(Intent.ACTION_VIEW) val encodedText = URLEncoder.encode("Helo World", "UTF-8") whatsAppIntent.data = Uri.parse("http://api.whatsapp.com/send?phone=$phoneNumber&text=$encodedText")