Skip to content

Receiving Flash SMS #116

@nitram2342

Description

@nitram2342

I noticed that the code seems not to handle flash SMS reception. For my purpose, I messed around with subclassing and overwriting _handleModemNotification, basically like this:

    def _handleModemNotification(self, lines):
[...]
            elif line.startswith('+CMT'):
                # PDU is in next line
                next_line_is_sms_pdu = True
            elif next_line_is_sms_pdu:
                _sms = decodeSmsPdu(line)
                sms = ReceivedSms(self, Sms.STATUS_RECEIVED_UNREAD,
                                  number=_sms['number'] if 'number' in _sms else None,
                                  time=_sms['time'] if 'time' in _sms else None,
                                  text=sms['text'] if 'text' in _sms else None)
                self.smsReceivedCallback(sms)
                return
[...]

Does it make sense to integrate it into the main code? If yes, I could make a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions