Software Archive
Read-only legacy content
Comunicados
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussões

Fail to Import Third-Party Plugin

Marco_S_
Principiante
695 Visualizações

Hi all,

I created an HTML+Cordova project and I tried without success to import and use plugin com.jsmobile.plugins.sms using Intel XDK internal tool.

I wonder where I am going wrong. Can you help me?

Thanks in advance.

Mark

0 Kudos
5 Respostas
John_H_Intel2
Funcionário
695 Visualizações

You must be doing something incorrectly. It works fine when I imported and added the correct code from the plugins site. 

function sendSMS()
        {
            var messageInfo = {
                phoneNumber: "4849425499",
                textMessage: "This is a test message"
            };

            sms.sendMessage(messageInfo, function(message) {
                console.log("success: " + message);
                }, function(error) {
                    console.log("code: " + error.code + ", message: " + error.message);
                });
        }

    <button style="width:100%;height:20px;left:0px;right:0px" onclick="sendSMS()">sendSMS</button>

 

John_H_Intel2
Funcionário
695 Visualizações

You need to build it and test it on device :)

Marco_S_
Principiante
695 Visualizações

Hi John,

thank you very much. You´re right , the plugin runs!

Two considerations:

 1> unfortunately the XDK it´s a bit tricky because don't see the code in the plugin list on the left with the others Cordova plugins.

 2> if you debug the device you get an error : sms not defined. Ok, into the INTEL XDK documentation I read that is not possible to debug of third-party plugin.

Thanks a Lot for you HELP !!

Marco

Marco_S_
Principiante
695 Visualizações

Is it possible to manually install the plugins, copying the source folder and modifing xml files?

John_H_Intel2
Funcionário
695 Visualizações

1. The list of Cordova plugins in the XDK are considered the core plugins. We test them to ensure they work. We can not include every Cordova plugin other wise we would have to test all of them to make sure they are compatiable, which we do not have time to do. This is why we allow you to include other 3rd party Cordova plugins.

2. You MUST build you app and install it to test the 3rd party plugins.

Responder