mirror of
https://github.com/bykof/cordova-plugin-webserver.git
synced 2025-05-19 02:34:04 +08:00
22 lines
622 B
Java
22 lines
622 B
Java
package org.apache.cordova.plugin;
|
|
|
|
import org.apache.cordova.api.CordovaPlugin;
|
|
import org.apache.cordova.api.PluginResult;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
|
|
/**
|
|
* This class echoes a string called from JavaScript.
|
|
*/
|
|
public class Webserver extends CordovaPlugin {
|
|
@Override
|
|
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
|
|
if ("start".equals(action)) {
|
|
callbackContext.success();
|
|
return true;
|
|
}
|
|
return false; // Returning false results in a "MethodNotFound" error.
|
|
}
|
|
}
|