Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Help me! Why my app do not read inbox message?
Forum Updated to NodeBB v4.3 + New Features

Help me! Why my app do not read inbox message?

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 2 Posters 2.8k Views 1 Watching
  • 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.
  • H Offline
    H Offline
    hungchuviet
    wrote on last edited by
    #1

    If I run app on QT Simulator, it return "This is a test message"
    But when I run on my phone (E72), it return empty string.
    here is my code:
    @QString smslib::readSMS()
    {
    QString retVal("Msg content:"");
    // Match all messages whose status field includes the Incoming flag
    QMessageFilter filter(QMessageFilter::byStandardFolder(QMessage::InboxFolder));
    //QMessageFilter filter(QMessageFilter::byStatus(QMessage::Incoming));
    // Order the matching results by their reception timestamp, in descending order
    QMessageSortOrder sortOrder(QMessageSortOrder::byReceptionTimeStamp(Qt::DescendingOrder));
    // Acquire a handle to the message manager
    QMessageManager manager;

    // Find the matching message IDs, limiting our results to a managable number
    const int max = 100;
    const QMessageIdList matchingIds(manager.queryMessages(filter, sortOrder, max));
    // Retrieve each message    
    foreach (const QMessageId &id, matchingIds) {
        QMessage message(manager.message(id));
        retVal.append(message.content());
    }
    return retVal.append("\"");//
    

    }
    @
    Thanks you!

    1 Reply Last reply
    0
    • A Offline
      A Offline
      archerabi
      wrote on last edited by
      #2

      Check for capabilities.You need readDeviceData capability to read messages.

      "Capabilities":http://developer.symbian.org/wiki/index.php/Capabilities_(Symbian_Signed)

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved