src/android/UseWaze.java
/**
     * Executes the request and returns PluginResult.
     *
     * @param action            The action to execute.
     * @param args              JSONArry of arguments for the plugin.
     * @param callbackContext   The callback id used when calling back into JavaScript.
     * @return                  True if the action was valid, false otherwise.
     */
Executes the request and returns PluginResult.
@param action            The action to execute.
@param args              JSONArry of arguments for the plugin.
@param callbackContext   The callback id used when calling back into JavaScript.
@return                  True if the action was valid, false otherwise.
Executes the request and returns PluginResult . @param action The action to execute . @param args JSONArry of arguments for the plugin . @param callbackContext The callback id used when calling back into JavaScript . @return True if the action was valid false otherwise .
@Override
    public boolean execute(String action, CordovaArgs args, final CallbackContext callbackContext) throws JSONException {
        Log.v(TAG, "Executing action: " + action);
	if ("search".equals(action)) {            
            callWaze("waze://?q=" + args.getString(0));
            return true;
        }
		else if ("centerOnMap".equals(action)) {            
            callWaze("waze://?ll=" + args.getString(0) + "," + args.getString(1) + "&z=" + args.getString(2));
            return true;
        }
		else if ("navigateTo".equals(action)) {
            callWaze("waze://?ll=" + args.getString(0) + "," + args.getString(1) + "&navigate=yes");
            return true;
        }
        return false;
    }
@ Override public boolean execute ( String action , CordovaArgs args , final CallbackContext callbackContext ) throws JSONException { Log . v ( TAG , "Executing action: " + action ) ; if ( "search" . equals ( action ) ) { callWaze ( "waze://?q=" + args . getString ( 0 ) ) ; return true ; } else if ( "centerOnMap" . equals ( action ) ) { callWaze ( "waze://?ll=" + args . getString ( 0 ) + "," + args . getString ( 1 ) + "&z=" + args . getString ( 2 ) ) ; return true ; } else if ( "navigateTo" . equals ( action ) ) { callWaze ( "waze://?ll=" + args . getString ( 0 ) + "," + args . getString ( 1 ) + "&navigate=yes" ) ; return true ; } return false ; }
Executes the request and returns PluginResult.
Executes the request and returns PluginResult .