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