PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Reading and deleting the SMS messages 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 first SMS stored:
  • in the memory of the Mobile Device (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 the Mobile Device (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 Android applications.
AndroidAndroid Widget Only SMS messages found in the phone memory can be handled by the SMS functions.
New in version 15
Android This function is now available for Android applications.
AndroidAndroid Widget Only SMS messages found in the phone memory can be handled by the SMS functions.
Android This function is now available for Android applications.
AndroidAndroid Widget Only SMS messages 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 control:
// 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> = SMSFirst(<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 name of the error, use the function ErrorInfo with the constant errMessage.
<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 SMS messages on a Smartphone

To read and/or delete SMS messages on a Smartphone (functions SMSNbMessage, SMSFirst, SMSNext or SMSDelete), the executable of the WINDEV Mobile application and its framework (WINDEV Mobile libraries) must be electronically signed.. A certificate is required to perform this operation.
Remark: If the executable is not signed, only the SMS of SIM card can be read.
Versions 16 and later
To sign the executable, simply specify the certificate that will be used in the mobile executable creation wizard. For more details, see Creating an executable.
New in version 16
To sign the executable, simply specify the certificate that will be used in the mobile executable creation wizard. For more details, see Creating an executable.
To sign the executable, simply specify the certificate that will be used in the mobile executable creation wizard. For more details, see Creating an executable.

Differences between GO mode and run time

In GO mode (simulation on the development computer), a WLanguage error is generated during the call to SMSFirst.
The differences between GO mode (simulator) and runtime are presented in Differences between GO mode and runtime.
AndroidAndroid Widget The SMS functions can be used during a GO on the Android emulator. To simulate the sending of SMS messages 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
Component: wp260com.dll
Minimum version required
  • Version 10
Comments
Click [Add] to post a comment