package castroi.whatsapp;
 
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.json.JSONObject;
import org.json.JSONArray;
import org.json.JSONException;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.util.Log;

public class Whatsapp extends CordovaPlugin {
    public static final String ACTION_WHATSAPP_SEND = "send";
    
    @Override
    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
        try {
            if (ACTION_WHATSAPP_SEND.equals(action)) {
                   String send_to = args.getString(0);
                   Uri mUri = Uri.parse("smsto:972527950004");
                   Intent mIntent = new Intent(Intent.ACTION_SENDTO, mUri);
                   mIntent.setPackage("com.whatsapp");
                   mIntent.putExtra("sms_body", "The text goes here");
                   mIntent.putExtra("chat",true);

                   this.cordova.getActivity().startActivity(mIntent);
                   callbackContext.success();
                   return true;
            }
            callbackContext.error("Invalid action");
            return false;
        } catch(Exception e) {
            System.err.println("Exception: " + e.getMessage());
            callbackContext.error(e.getMessage());
            return false;
        } 
    }
}
@@ -685,16 +685,19 @@
         
+/**
 Uri mUri
@@ -728,24 +728,24 @@
 27950004%22);%0A
-
             
@@ -1132,16 +1132,328 @@
 rn true;
+*/%0A                   Intent sendIntent = new Intent(%22android.intent.action.MAIN%22);%0A                   sendIntent.setComponent(new  ComponentName(%22com.whatsapp%22,%22com.whatsapp.Conversation%22));%0A                   sendIntent.putExtra(%22jid%22, send_to+%22@s.whatsapp.net%22);%0A                   startActivity(sendIntent);%0A
 %0A       
@@ -1727,9 +1727,10 @@
  %0A    %7D%0A
-
 %7D
+%0A

Update Whatsapp.java