PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Managing errors
  • Differences between GO mode and run time
  • Required permissions
  • Folder of SMSs sent
  • SMS sent by the user
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Sends an SMS. The characteristics of this SMS have been specified in the SMS structure.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Android Widget This function is now available in Android Widget mode.
Example
// Initialize the SMS structure for a standard number
SMS.Number = "0610203040"
SMS.Message = "I am sending SMSs with WINDEV Mobile!"

// Send the SMS
ResSend is boolean = SMSSend()

// Error occurred?
IF ResSend = False THEN
Error(ErrorInfo(errMessage))
END
// Initialize the SMS structure for a short number
SMS.Number = "3040"
SMS.Message = "I am sending SMSs with WINDEV Mobile!"
SMS.NumberType = smsNationalNumber

// Send the SMS
ResSend is boolean = SMSSend()

// Error occurred?
IF ResSend = False THEN
Error(ErrorInfo(errMessage))
END
Syntax
<Result> = SMSSend()
<Result>: Boolean
  • True if the SMS was sent,
  • False otherwise. To find out the error details, use ErrorInfo associated with the errMessage constant.
Versions 15 and later
AndroidAndroid Widget If SMSSend is run in the main application thread, an hourglass (infinite progress bar) will be displayed when the message is sent. To specify the message that will be displayed in the hourglass, use NextTitle just before the call to SMSSend.
New in version 15
AndroidAndroid Widget If SMSSend is run in the main application thread, an hourglass (infinite progress bar) will be displayed when the message is sent. To specify the message that will be displayed in the hourglass, use NextTitle just before the call to SMSSend.
AndroidAndroid Widget If SMSSend is run in the main application thread, an hourglass (infinite progress bar) will be displayed when the message is sent. To specify the message that will be displayed in the hourglass, use NextTitle just before the call to SMSSend.
Remarks

Managing errors

SMSSend generates an error in the following cases:
  • the recipient number is invalid,
  • the message to send is too long,
  • the SMS center is overloaded.
  • ...

Differences between GO mode and run time

In GO mode (simulation on the development computer), a WLanguage error is generated during the call to SMSSend.
The differences between GO mode (simulator) and real use are presented in Differences between GO mode and real use.
AndroidAndroid Widget The SMS functions can be used during a GO on the Android emulator. To simulate the sending of SMSs to the emulator, see the documentation of the Android SDK : https://developer.android.com/studio/run/emulator#console
AndroidAndroid Widget

Required permissions

The call to this function modifies the permissions required by the application.
Required permission: SEND_SMS
AndroidAndroid Widget

Folder of SMSs sent

The sms/sent folder that can be found on some Android devices is not automatically filled when an SMS is sent.
AndroidAndroid Widget iPhone/iPad

SMS sent by the user

If the SMS must be actually sent by the user from the native application of the device (Android or iPhone/iPad), use SMSRunApp.
Related Examples:
Pocket Managing Contacts Mobile (WINDEV Mobile): Pocket Managing Contacts
[ + ] This example presents the management of contacts in Pocket PC.
The following topics will be presented in this example:
1/ the loopers
2/ the use of queries
3/ sending SMSs
4/ sending emails
5/ the phone call.
PC Sending SMS Mobile Windows (WINDEV Mobile): PC Sending SMS
[ + ] This example is used to create SMSs on a computer and to transfer them to a Pocket PC or to a Smartphone equipped with a SIM card in order to send them.
To use the PC Sending SMSs example, the Pocket Sending SMSs example must be installed on the Pocket PC or on the Smartphone.
A synchronization can be performed when the application is started to check whether SMSs must be sent or not.
Pocket Sending SMS Mobile Windows (WINDEV Mobile): Pocket Sending SMS
[ + ] This example is used to send SMSs created from the PC Sending SMSs example.
You also have the ability to write and send SMSs from the Pocket application.
How do I send an SMS from a Pocket PC or from a Smartphone with WINDEV Mobile?
All you have to do is use the SMS.XXX variables and the function named SMSSend():
  SMS.Message = "This is an SMS"
  SMS.Number  = "0612345678"
  SMSSend()
Components
Windows Mobile wp230com.dll
Android wd230android.jar
Minimum required version
  • Version 9
Comments
Links SMS Short Number example
http://forum.pcsoft.fr/fr-FR/pcsoft.br.windev/536-envio-sms-pelo-windev-mobile/read.awp

http://forum.pcsoft.fr/fr-FR/pcsoft.br.windev/754-trabalhando-com-httprequest-com-exemplos-que-usam-curl/read.awp

http://forum.pcsoft.fr/fr-FR/pcsoft.br.windev/829-api-para-enviar-sms-com-garantia-entrega-short/read.awp

http://forum.pcsoft.fr/fr-FR/pcsoft.br.windev/1239-enviar-arquivo-json-por-rest-para-webservice-sms/read.awp
BOLLER
Sep. 29 2016