public override bool ShouldStartLoad(UIWebView webView, NSURLRequest request, UIWebViewNavigationType navigationType) { Debug.Log("ShouldStartLoad"); // handle the special url schema as a way to communicate from the web NSURL url = request.URL(); if (url != null && url.Scheme().Equals("u3dxt")) { object[] paths = url.PathComponents(); Debug.Log(paths.Length); string command = paths[1] as string; Debug.Log("command: " + command); if (command.Equals("say")) { string phrase = paths[2] as string; Debug.Log("Phrase: " + phrase); SpeechXT.Speak(phrase); } // do not actually load this return(false); } else { return(true); } }
public override bool ShouldStartLoad(UIWebView webView, NSURLRequest request, UIWebViewNavigationType navigationType) { Debug.Log ("ShouldStartLoad"); // handle the special url schema as a way to communicate from the web NSURL url = request.URL(); if (url!=null && url.Scheme().Equals("u3dxt")) { object[] paths = url.PathComponents(); Debug.Log (paths.Length); string command = paths[1] as string; Debug.Log ("command: " + command); if ( command.Equals("say") ) { string phrase = paths[2] as string; Debug.Log ("Phrase: " + phrase); SpeechXT.Speak(phrase); } // do not actually load this return false; } else { return true; } }
public void setURL(string url) { lock(_webview){ _url = new NSURL(url); _request = new NSURLRequest( _url ); _webview.LoadRequest(_request); } }
public void setURL(string url) { lock (_webview){ _url = new NSURL(url); _request = new NSURLRequest(_url); _webview.LoadRequest(_request); } }
void OnDestroy() { // load a blank page before removing it _webview.StopLoading(); _webview.LoadHTMLString("", new NSURL("")); _webview.RemoveFromSuperview(); // _webview.hidden = true; _webview = null; _request = null; _url = null; }
public virtual void LoadRequest(NSURLRequest request) { }