This is a repost of my last forum post which I cancelled prematurely.
I'm trying to use the API AI natural language processing but I'm stuck at step one. I've gone into the plug-ins on the project found the ApiAiSDK plugin in the telerik in the supported third party plug-in and selected it. I'm using the web client to build the app. (No desktop environment).
The docs say to put in a call to init in the deviceready function
if (window.cordova) {
document.addEventListener('deviceready', function () {
...
cordova.plugins.apiAiSDK.init(
{
subscriptionKey: "xxxxxx",
clientAccessToken: "xxxxx",
lang: "en"
},
function(result) { console.log("worked");},
function(error) { console.log("failed");}
);
...
}
But I get an error saying Uncaught TypeError: Cannot read property 'apiAiSDK' of undefined. Cordova.plugins doesn't exist when I look for it using the debugger. I'm missing something basic here, but I don't know what.