Send WhatsApp Messages using the Android SDK

Learn how to use this Android SDK to Send WhatsApp Messages using the WhatsApp API
In settings.gradle (Project)

dependencyResolutionManagement {
repositories {
…….
maven { url ‘https://jitpack.io' }
}
}
dependencies {
implementation ‘com.github.myinnos:WhatsApp-SDK:<latest-version>’
}
WhatsAppInitialization.sendMessage(
“token”, //token
“version”, //ex: v13.0
“phone_number_id”, //ex: 103075932423434
“customer_phone_number”,
“template_name”, //ex: hello_world
“language_code”, //ex: en_US
) { wResult ->
Handler(Looper.getMainLooper()).post {
if (wResult?.getMessage() == null) {
// failed results
} else {
// success results
Log.d(“RESULTS”, wResult.getMessage())
}
}
}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Prabhakar Thota

Mobile Engineer, UI/UX. I believe in the quote, “Creativity is thinking up new things. Innovation is doing new things.” Happy Coding :)