![]() |
2012-05-27
, 12:02
|
|
Posts: 275 |
Thanked: 389 times |
Joined on Feb 2010
@ Sydney
|
#2
|
connect(&m_manager, SIGNAL(messageAdded(const QMessageId&, const QMessageManager::NotificationFilterIdSet&)), this, SLOT(messageReceived(const QMessageId&, const QMessageManager::NotificationFilterIdSet&))); m_notifFilterSet.insert(m_manager.registerNotificationFilter( QMessageFilter::byType(QMessage::Sms) & QMessageFilter::bySender(SMS_NUMBER)));
void MessageHandler::messageReceived(const QMessageId& id, const QMessageManager::NotificationFilterIdSet& matchingFilterIds) { if (matchingFilterIds.contains(m_notifFilterSet)) { QMessage message = m_manager.message(id); QString messageString = message.textContent(); qDebug() << "message received" << messageString; if (messageString.startsWith(m_stop)) { m_message = messageString; emit messageChanged(messageString); } if (m_deleteMessage) { deleteSent(); m_manager.removeMessage(id); } } }
The Following 2 Users Say Thank You to GreatGonzo For This Useful Post: | ||
![]() |
2012-05-27
, 12:54
|
|
Posts: 275 |
Thanked: 389 times |
Joined on Feb 2010
@ Sydney
|
#3
|
![]() |
2012-05-28
, 08:57
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#4
|
![]() |
2012-05-28
, 09:34
|
|
Posts: 275 |
Thanked: 389 times |
Joined on Feb 2010
@ Sydney
|
#5
|
The Following User Says Thank You to GreatGonzo For This Useful Post: | ||
![]() |
2012-05-28
, 10:12
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#6
|
This is quite frustrating development. qtmobility is fragile at best and I am sitting on an almost finished application.
![]() |
2012-05-28
, 10:43
|
|
Posts: 275 |
Thanked: 389 times |
Joined on Feb 2010
@ Sydney
|
#7
|
![]() |
2012-05-28
, 10:46
|
|
Posts: 275 |
Thanked: 389 times |
Joined on Feb 2010
@ Sydney
|
#8
|
The Following User Says Thank You to GreatGonzo For This Useful Post: | ||
![]() |
2012-05-28
, 12:39
|
Posts: 304 |
Thanked: 235 times |
Joined on May 2010
@ Manila
|
#9
|
I try to use QMessageManager to listen for incoming
messages (SMS/InstantMessage). But I only got it
working for E-Mail. This is my code
I tried different filters, empty filters, filter for InstantMessage,
SMS and InstantMessage. But only the empty filter or
a filter which includes QMessage::EMail works, and only for
new emails.
Anyone got this working or any idea what I could have
missed?
nicolai
my contributions:
Desktop Clock Widget|Calendar Home Widget|Lens Cover Reminder|ConnectNow|Scout|App Search Widget|ProfilesX|
Desktop-Switcher|SMS-Messageblocker
-Donate-