|
|
|
|
- Use in the main thread
- Managing errors
- Differences between GO mode and runtime
- Required permissions
- Folder of SMSs sent
- SMS sent by the user
SMSSend (Function) In french: SMSEnvoie Sends an SMS. The characteristics of this SMS have been specified in the SMS structure. Remark: To send SMS messages with an attachment, use SMSRunApp.
// 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>: Boolean - True if the SMS was sent,
- False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
Remarks Use in the main thread 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 to be displayed in the hourglass, call NextTitle just before SMSSend. Managing errors SMSSend throws 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 runtime A WLanguage error is raised when SMSSend is called in test mode (GO) (simulation on the development computer). Required permissions The call to this function modifies the permissions required by the application. Required permission: SEND_SMS 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. 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. Component: wd280android.aar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|