PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Reading and deleting the SMSs found on a Smartphone
  • Differences between GO mode and run time
  • Required permissions
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
Reads the next SMS:
  • in the memory of Pocket PC or Smartphone (the executable must be signed).
  • Versions 15 and later
    in the memory of Android phone.
    New in version 15
    in the memory of Android phone.
    in the memory of Android phone.
  • in the SIM card of Pocket PC or Smartphone.
The characteristics of this SMS are contained in the SMS structure.
Versions 15 and later
Android This function is now available for the Android applications.
AndroidAndroid Widget Only the SMSs found in the phone memory can be handled by the SMS functions.
New in version 15
Android This function is now available for the Android applications.
AndroidAndroid Widget Only the SMSs found in the phone memory can be handled by the SMS functions.
Android This function is now available for the Android applications.
AndroidAndroid Widget Only the SMSs found in the phone memory can be handled by the SMS functions.
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
Windows Mobile
// Number of SMSs stored on the SIM card
STC_NbSMS = "You have " + SMSNbMessage(smsSIM) + " messages."

// Read the first SMS stored on the SIM card
ResRead is boolean = SMSFirst(smsSIM)

WHILE ResRead = True
// Display the characteristics of this SMS in a table :
// the SMS variable is automatically updated
TableAddLine(TABLE_SMSTable, SMS.Subscript, SMS.Message, SMS.Number, SMS.ReceiveDate)
// Read the other SMSs
ResRead = SMSNext(smsSIM)
END
Syntax
<Result> = SMSNext(<Location>)
<Result>: Boolean
  • True if the SMS was read. SMS.ReceiveDate, SMS.Subscript, SMS.Message, SMS.Number and SMS.NumberType are automatically filled. See the SMS structure for more details.
  • False otherwise. To find out the error details, use ErrorInfo associated with the errMessage constant.
<Location>: Integer constant
Location of SMS to read:
smsMemorySMS stored in the device memory.
smsSIMSMS stored in the SIM card.
AndroidAndroid Widget This constant is not allowed and it triggers a fatal error.
Remarks
Windows Mobile

Reading and deleting the SMSs found on a Smartphone

To read and/or delete the SMSs found on a Smartphone (SMSNbMessage, SMSFirst, SMSNext or SMSDelete), the executable of WINDEV Mobile application as well as its framework (WINDEV Mobile libraries) must be digitally signed. A certificate is required to perform this operation.
Note: If the executable is not signed, only the SMS of SIM card can be read.

Differences between GO mode and run time

In GO mode (simulation on the development computer), a WLanguage error is generated during the call to SMSNext.
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 : READ_SMS
Components
Windows Mobile wp230com.dll
Android wd230android.jar
Minimum required version
  • Version 10
Comments
Links SMS Short Number
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