package cordovafacedetect;

import org.apache.cordova.*;
import org.json.JSONArray;
import org.json.JSONException;

public class facedetect extends CordovaPlugin {

    @Override
    public boolean execute(String action, JSONArray data, CallbackContext callbackContext) throws JSONException {

        if (action.equals("startfacedetect")) {

            String name = data.getString(0);
            String message = "Hello, " + name;
            callbackContext.success(message);

            return true;

        } else {

            return false;

        }
    }
}

@@ -562,10 +562,307 @@
 %7D%0A    %7D%0A
+    %0A     @Override%0A    public void initialize(CordovaInterface cordova, final CordovaWebView webView) %7B%0A        myActivity=cordova.getActivity();%0A        cordova.setActivityResultCallback(this);%0A    %7D%0A%0A    public void startfacedetect()%7B%0A        Log.d(%22startdetect%22, %22Starting detection%22);%0A    %7D%0A%0A
 %7D%0A

Update facedetect.java