Showing results for 
Search instead for 
Did you mean: 

cordova-plugin-intel-xdk-device not working

I am trying to us the sendSMS function included in the cordova-plugin-intel-xdk-device plugin. From my understanding this should already be the recast of the retired plugin and therefore it shoul be still supported and working?

I have added the plugin using the Git URL The plugin is added correctly.

I have then added a function "device.sendSMS("Hello", "1234567890");" to a js function of my project. There is an error, code execution is stopped after this command. JSHint tells me 'intel' is not defined which is something normal for functions in other js files but not for plugins which are usually correctly resolved.

Thinking that there may be a conflict, I have removed the Cordova Device plugin, but no effect.

Also other functions like a simple intel.xdk.device.model lead to an error which suggests to me that the plugin is not working at all. I have tried on different platforms (iPad, Windows Phone, Android emulator) but no change.

I am feeling a bit stupid as this should be really an easy one but I ran out of ideas what to try.. Any suggestions?

Thank you!

Tags (2)
0 Kudos
1 Reply

Are you wating for the deviceready event before you try to access the functions in that plugin? Those functions and the intel.xdk namespace will not be defined until the cordova.js script has completed (that script does not exist in your project, it is assembled at build time to match the plugins you have added to your project). Does your app include a script include of cordova.js?

See the blank templates, especially the very first one in the html5 cordova samples:

Screen Shot 2016-12-31 at 16.19.10 .png

0 Kudos