Software Archive
Read-only legacy content

Help! Code

Emmanuel_A_
Beginner
692 Views

Good afternoon,

I'm not programardor, not have much notion of systems.

I'm making an app in the XDK, simple.

A screen has an entry, the user enters a phone number.

and another screen it sends a message to the number

I've got two problems:

1) I can not write data at the entrance (every time the phone off, the data disappear)

2) I do not know how to call the number entered at the entrance, in code.


follows:

sms code (I'm using a plugin):

  var messageInfo = {
     phoneNumber: "NUMBER"
     TextMessage "message"
};

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

 

0 Kudos
1 Solution
Pamela_H_Intel
Moderator
692 Views

Emmanuel,

If I understand correctly, you are new to programming and using a Cordova plugin to send SMS messages.

It sounds like your problem is with how to use the plugin, not with how to use Intel XDK.

If you are new to programming, it would be best to start with a simple app, not one where you have to establish a connection and send data. But if you want to pursue this app, then check the plugin documentation to see how to use it and if it has any limitations. It might be easiest if you found a sample project using that plugin.

View solution in original post

0 Kudos
5 Replies
Pamela_H_Intel
Moderator
693 Views

Emmanuel,

If I understand correctly, you are new to programming and using a Cordova plugin to send SMS messages.

It sounds like your problem is with how to use the plugin, not with how to use Intel XDK.

If you are new to programming, it would be best to start with a simple app, not one where you have to establish a connection and send data. But if you want to pursue this app, then check the plugin documentation to see how to use it and if it has any limitations. It might be easiest if you found a sample project using that plugin.

0 Kudos
Emmanuel_A_
Beginner
692 Views

the message is being sent, when I put the number directly into the code, the problem is that the User must register the number.
and that the number it has signed up to be the shipment.

0 Kudos
Pamela_H_Intel
Moderator
692 Views

So the app works as expected when you hard code the destination phone number? But it fails when the user types in the phone number? What is the behavior? Is there an error message? Have you looked at the log? Which plugin are you using? Are you testing in the emulator or on device?

For your other question (#1), do you mean that the user starts typing a message, it shows, but when the user switches applications (like the phone rings, automatically switching to the phone app) and then the user comes back to your app, then the message is gone?

0 Kudos
Dale_S_Intel
Employee
692 Views

You might find this article helpful:

https://software.intel.com/en-us/xdk/blog/heading-home-with-the-intel-xdk

Dale

 

 

0 Kudos
Jonas1
Beginner
692 Views

Hi Emmanuel!

Did you solve it?

 

0 Kudos
Reply