Starts the native application for sending SMSs found on the device (Android or iPhone/iPad). The content and the recipients of the SMS are initialized from the information specified in the SMS structure
Caution: The SMS is not sent. Only the controls of the application for sending SMSs are initialized.
SMS.Number = "0610203040"
SMS.Message = "I am sending SMSs with WINDEV Mobile!"
If no native application for sending SMSs was found on the device, the ErrorOccurred
variable will be set to True
after the call to the function. To get more details on the error, use ErrorInfo
Application in the background: Specific case from Android 10
From Android 10, it is no longer possible to open a window when the application is in the background.
SMSRunApp can open a window. If this function is used while the application is in the background, a fatal error will occur.
- It is possible to determine if the application is in the background using InBackgroundMode.
- If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). The application will be brought back to the foreground when the notification is clicked, if the ActivateApplication property is set to True. You can also open a window from the procedure passed to the ActionClick property.
Cross-platform examples (WINDEV Mobile): WM System