Sms messages (in-out). What functions do I need?



  • Hi, I have this problem:
    I need my app detects incoming sms, process the sms, and finally responds (automatically).

    I do not know what functions need (I do not understand the information in https://developer.blackberry.com/cascades/reference).
    To send sms:

    • use the class SmsTransport
      @
      ...
      m_smsTransport = new SmsTransport(this);
      connect(m_smsTransport, SIGNAL(messageReceived(unsigned int, const Message &)), SLOT(messageReceived(unsigned int, const Message &)));
      connect(m_smsTransport, SIGNAL(messageSendResultReceived(bb::pim::message::MessageKey)), SLOT(messageSendResultReceived(bb::pim::message::MessageKey)));
      m_smsTransport->registerPort(1);
      ...

    void MainWidget::messageReceived(unsigned int puerto, const Message & mensaje)
    {

    }

    void MainWidget::messageSendResultReceived(bb::pim::message::MessageKey messageid)
    {
    //check status

    }

    @
    when I need to send a sms I use
    @
    void MainWidget::enviarmensajesms(unsigned int puerto, const Message & mensaje)
    {
    m_smsTransport->send(puerto, mensaje);
    }
    @

    I have not a real device, I can not test the code. Need anything else? How register ports for incoming messages? Thanks for help.


Log in to reply