Help me! Why my app do not read inbox message?
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:
- {
- // 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
- // 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
Check for capabilities.You need readDeviceData capability to read messages.
Capabilities [developer.symbian.org])
You must log in to post a reply. Not a member yet? Register here!
