Returns the number of SMS messages stored on an Android phone.
Note: In Android, SMS functions can handle only the messages stored on the phone.
// Number of SMS messages stored on the phone's memory
STC_NbSMS = "You have " + SMSNbMessage(smsMemory) + " messages."
<Result> = SMSNbMessage(<Location> , <Type of information>)
- Number of SMSs stored or number of SMSs that can be stored,
- -1 if an error occurred. To get more details on the error, use ErrorInfo with the errMessage constant.
<Location>: Integer constant
Location of SMSs:
|smsMemory||SMS messages stored in the device's memory.|
<Type of information>: Integer constant
Requested type of information:
|smsTotalNb||Number of stored SMSs.|
Differences between GO mode and runtime
A WLanguage error is raised when SMSNbMessage is called in test mode (GO) (simulation on the development computer).
The call to this function modifies the permissions required by the application.
Required permission : READ_SMS