Skip to main content

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 parametersInput parameter typeDescription
Mobile Device ObjectPhoneConnected mobile object
SMS Countint or strNumber of most recent SMS messages to read

Command Output Parameters

Output parametersOutput parameter typeDescription
SMS Listlist[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

FAQ

See Mobile Automation FAQ