![]() |
QMessageManager queryMessages problem with SMS
Hello,
I am trying to fetch users SMS from the device but it seems like it doesn't function correctly. I am using following: const QDateTime minimumDate(QDate(2009,8,20)); QMessageFilter includeFilter(QMessageFilter::byTimeStamp(minimumD ate, QMessageDataComparator::GreaterThanEqual)); includeFilter &= QMessageFilter::byType(QMessage::Sms); QtMobility::QMessageIdList ids = QtMobility::QMessageManager().queryMessages(includ eFilter); And ids list returns empty (It works for Email). Can anyone else confirm this bug when running application in N900? I am using QtCreator on Windows 7 and USB networking connection to n900. QTCreator Emulator doesn't have any SMS messages in it to test against. My other - very ugly and n900 only - solution would be to use sql to fetch SMS from the rtcom sqlite database, but I wouldn't like to use that option. |
Re: QMessageManager queryMessages problem with SMS
Hi,
are you running the application from QtCreator directly? I've seen some issues reading the contact database, as it does not execute the application as "user" but as "developer". Try to run the application from the device as "user" and see what happens. Daniel |
Re: QMessageManager queryMessages problem with SMS
Hi trotor,
a minimal working example: mobtest.pro Code:
TARGET = mobtest Code:
#include <iostream> Code:
mad qmake Code:
run-standalone ./mobtest regards Nicolai |
Re: QMessageManager queryMessages problem with SMS
Quote:
Is it possible to run software in the phone as user (or with user permission level) directly from the 'build' click from qtcreator? I managed to get it run correctly by doing build, close window, then from system console su user - appname (i connect there with rootshell, even that wasn't enough). But I find that way a bit cumbersome compared to "writecode-press f5-see what happens" -way which I am used to. I have been spoiled by Visual Studio and C#. Biiiig Thank you to both of you (no thank you button visible)!!!! p.s. I already did workaround by reading sqlite database directly before you answered. I found out there is actually el.db and el-v1.db in my n900. v1 one is 'current'. |
All times are GMT. The time now is 07:38. |
vBulletin® Version 3.8.8