Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Highlighted
Contributor
Posts: 19
Registered: ‎03-05-2013
My Device: 9700
My Carrier: BlackBerry

MessageFilter not working as aspects

Hello Friends,

 

I have a issue, I am trying to fetch all sent SMS . But below method returns all TextMessages.

 

Can someone tell me what I am doing incorrect ??

 

bb:Smiley Tongueim::account::AccountService accountService;

 //Get the SMS/MMS account
 QList<Account> accountList = accountService.accounts(Service::Messages, "sms-mms");
AccountKey accountId = accountList.first().id();

 

MessageFilter mf;
mf.insert(MessageFilter::TransmissionStatus, MessageTransmissionStatus:Smiley Frustratedent);

 

int messagecout = QString::number(MessageService().messageCount(accountId, mf));

 

QList<Message> messages = MessageService().messages(accountId, mf);

 

Thanks in advacnce