This guide explains how to use the telephony features in a project.
Making a Call
Making a call is a very basic telephony feature. It allows the user to call any number in the application.
The code lines below show how to make a call;
Sending an SMS
İOS does not support sendInBackground. This is a default behavior for Apple devices. Either you set true or false the iOS will get false.
In any application developed in the Smartface, SMS can be easily sent. It requires some parameters which define the content and sending methods.
|phoneNumber||String||The number that you want to send message.|
|messageText||String||The message that you want to send.|
|onSuccess||Function||The function that will be called if the sendSMS method succeeds|
|onFailure||Function||The function that will be called if the sendSMS fails|
|sendInBackground||Boolean||If it is true, SMS will be sent in the background.|
You can easily send an SMS with sample codes below.
Handling a Received SMS
In Android Devices (iOS does not support), the received SMS can be read in the application. In order to use that feature, the onSMSReceived event should be used in the "app.js" file.
The onSMSReceived event has following properties :
Here is the simple codes of an application which handles a received SMS;