示例#1
0
    public void SendTextToApiAi(string text)
    {
        ServicePointManager.ServerCertificateValidationCallback = delegate(object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) {
            return(true);
        };

        try {
            var response = apiaiClient.TextRequest(text);
            if (response != null)
            {
                ProcessOutput(response);
            }
            else
            {
                utilsPlugin.ShowToastMessage("Response is null");
            }
        } catch (Exception ex) {
            utilsPlugin.ShowAlertPopup("API.AI Error", "Error while processing API.AI response: " + ex);
        }
    }
示例#2
0
 public void ShowAlertPopup()
 {
     utilsPlugin.ShowAlertPopup("your native popup title", "your native popup message");
 }