Read Mobile SMS
Command description
Read recent SMS messages from the mobile device, including the time, sender, recipient, and content.
tip
Compatible with Android 8 and later. Compatibility is not guaranteed on every device model.
Command Input Parameters
| input parameters | Input parameter type | Description |
|---|---|---|
| Mobile Device Object | Phone | Connected mobile object |
| SMS Count | int or str | Number of most recent SMS messages to read |
Command Output Parameters
| Output parameters | Output parameter type | Description |
|---|---|---|
| SMS List | list[SMS] | List of text message objects read, including date, sender, recipient, content and other information |
Type definition reference
SMS object definition
class SMS:
@property
def content(self):
"""
SMS content
:return: str
"""
pass
@property
def sender(self):
"""
SMS sender’s mobile phone number
:return: str
"""
pass
@property
def receiver(self):
"""
SMS recipient’s mobile phone number
:return: str
"""
pass
@property
def date(self):
"""
SMS date
:return: str
"""
pass
Example
tip
Enable Developer options on the mobile device, then connect it to the computer with a USB cable. See Connect Mobile Device