Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

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

    Qt on BlackBerry and QNX
    1
    1
    1668
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      nfrfab last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post