hch
2024-05-22 ed173f2b05259cf7e900cecf8f5ec90e51aa4d15
SdkProject/library/src/main/java/com/secondworld/sdk/command/CmdOpenWebView.java
@@ -1,17 +1,24 @@
package com.secondworld.sdk.command;
import com.secondworld.sdk.utils.CodeU2A;
import com.secondworld.sdk.utils.WebViewUtil;
import org.json.JSONException;
import org.json.JSONObject;
public class CmdOpenWebView implements  ICommand {
public class CmdOpenWebView implements ICommand {
    @Override
    public int getCode() {
        return CodeU2A.OpenWebView;
    }
    @Override
    public void process(JSONObject json) {
    public void process(JSONObject json) throws JSONException {
        String url = json.getString("url");
        if (json.has("delay")) {
            boolean delay = json.getBoolean("delay");
            WebViewUtil.I.open(url, delay);
        } else
            WebViewUtil.I.open(url, true);
    }
}