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
SMSNbMessage (Function)
In French: SMSNbMessage
Returns the number of SMSs stored or the maximum number of SMSs that can be stored:
  • 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.
Versions 15 and later
Android This function is now available for the Android applications.
Android 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.
Android 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.
Android 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> = SMSNbMessage(<Location> , <Type of Information>)
<Result>: Integer
  • Number of SMSs stored or number of SMSs that can be stored,
  • -1 if an error occurred. To find out the error details, use ErrorInfo associated with the errMessage constant.
<Location>: Integer constant
Location of SMSs:
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.
<Type of Information>: Integer constant
Requested type of information:
smsTotalNbNumber of stored SMSs
smsNbUsedMaximum number of SMSs that can be stored
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.
Versions 16 and later
To sign the executable, all you have to do is specify the certificate that will be used in the wizard for creating the mobile executable. See Creating an executable for more details.
New in version 16
To sign the executable, all you have to do is specify the certificate that will be used in the wizard for creating the mobile executable. See Creating an executable for more details.
To sign the executable, all you have to do is specify the certificate that will be used in the wizard for creating the mobile executable. See Creating an executable for more details.

Differences between GO mode and run time

In GO mode (simulation on the development computer), a WLanguage error is generated during the call to SMSNbMessage.
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
Click [Add] to post a comment