AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
El contenido de esta página se actualizaó a la versión 25.  Consulte la documentación 25 .
Ayuda / WLanguage / Funciones WLanguage / Funciones específicas para móviles / Funciones SMS
  • Use in the main thread
  • Error management
  • Differences between GO mode and runtime
  • Required permissions
  • Folder of SMSs sent
  • SMS sent by the user
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Sends an SMS. The characteristics of this SMS have been specified in the SMS structure.
Note: To send SMS with an attachment, use the SMSRunApp function.
Novedad versión 18
Widget Android This function is now available in Android widget mode.
Ejemplo
// 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
Sintaxis
<Result> = SMSSend()
<Result>: Boolean
  • True if the SMS was sent,
  • False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
Observaciones

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.

Error management

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).
Las funciones SMS pueden utilizarse durante una GO en el emulador de Android. Para simular el envío de mensajes SMS al emulador, consulte la documentación del SDK de Android: https://developer.android.com/studio/run/emulator#console

Required permissions

This function changes the permissions required by the application.
Permission required: 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.
Clasificación Lógica de negocio / UI: Lógica de negocio
Componente: wd300android.aar
Versión mínima requerida
  • Versión 9
Comentarios
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
29 09 2016

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local