| | |
| | | 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); |
| | | } |
| | | } |