Reputation: 31
I want to read SMS from device for this I use the following code..
using namespace bb::pim::message;
MessageService service;
MessageSearchFilter filter;
filter.addSearchCriteria(SearchFilterCriteria::Subject, "");
filter.addStatusCriteria(SearchStatusCriteria::Unread);
filter.setLimit(10);
QList<Message> localMessageResults = service.searchLocal(1, filter);
But I can't get any SMS list in result.
Upvotes: 0
Views: 79
Reputation: 3535
I believe you are missing permission in your .bar file. See link for more information.
Permissions: To use the messaging service, you must set the access_pimdomain_messages permission to access email and PIN messages and the access_sms_mms permission to access text messages. These permissions are set in the bar-descriptor.xml file of your project.
Also this sample app will help.
Upvotes: 1