
Originally Posted by
kiran10182
Hi,
Kiran thanks for reply,I have tried the code provided in link but nothing happens .
I have tested the code in following way:
I started the application and then I sent the message to this mobile , but it didn't react to it .I have placed Message box to read sms body .
Code:
void SmsNotify::messageAdded(const QMessageId &id, const QMessageManager::NotificationFilterIdSet &matchingFilterIds)
{
if(id.isValid()) {
QMessage msgReceived(id);
QMessageContentContainer bodyPart = msgReceived.find(msgReceived.bodyId());
// bodyPart.isContentAvailable() : returns true if there is message body
QString bodyText = bodyPart.textContent();
QMessageBox::information(this,"Username",bodyText);
QString msgSender = msgReceived.from().recipient();
QMessageBox::information(this,"Username",msgSender);
}
else {
// Ignore this state
}
}
And another thing QMessageStore is not working I have used QMessageManager instead.
Code:
private:
QMessageManager* msgStore;
QMessageFilter msgFilter;
QMessageManager::NotificationFilterId msgFilterId;
So am I doing it wrong way or I have to put some more code to get it work??,Plz can u help me ...
Regards,
Vishal