I develop an app with a functionality for sharing text. This is working fine except for WhatsApp. What should I do? Is there any specific API for that?
You can use intent to do so. No need to use Whatsapp API. Hope that I have not misunderstood your question. Hope that helps, thanks.
Intent whatsappIntent = new Intent(Intent.ACTION_SEND);
whatsappIntent.setType("text/plain");
whatsappIntent.setPackage("com.whatsapp");
whatsappIntent.putExtra(Intent.EXTRA_TEXT, "The text you wanted to share");
try {
activity.startActivity(whatsappIntent);
} catch (android.content.ActivityNotFoundException ex) {
ToastHelper.MakeShortText("Whatsapp have not been installed.");
}