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
New Developer
Posts: 31
Registered: ‎02-01-2014
My Device: Q10 SQN100-3
My Carrier: Factory Unlocked

MessageService error when requesting conversation info

Hey,

 

I'm trying to acquire info about the conversation of SMS messages, but I encounter the following issue, it's on 10.3.700 Dev OS:

 

ServiceBridgeClient::dataAvailable 
PpsFile::getBuffer: Allocating buffer for thread:  1
ServiceBridgeClient::handleMsgFromServer - msg= QMap(("dat", QVariant(QVariantMap, QMap(("acct_key", QVariant(int, 23) ) ( "conv_key" ,  QVariant(QString, "1") ) ( "msg_count" ,  QVariant(int, 14) ) ( "msg_key" ,  QVariant(int, 14) ) )  ) ) ( "msg" ,  QVariant(QString, "msg_added") ) )  
ChatMessageService::getStorageHandle - new storage handle for thread -  0x1
Storage::Storage: Invalid DB path  "/var/db/text_messaging/messages.db"
Storage::Storage: "unable to open database file Error opening database"
QSqlDatabasePrivate::database: unable to open database: "unable to open database file Error opening database"
QSqlQuery::prepare: database not open
Storage::prepareQuery: "select conversationId,accountId,status,subject,name,timeStamp,sourceId from Conversations where conversationId=? AND accountId=?" " "

 

 My code is the following:

 

 

 void Service::onMessageAdded(bb::pim::account::AccountKey accountId, bb::pim::message::ConversationKey conversationId, bb::pim::message::MessageKey messageId)
{
    bb::pim::message::Conversation convo = m_message->conversation(accountId, conversationId);
    QList<bb::pim::message::MessageContact> participants = convo.participants();
}

 

 As I said it's on 10.3.700 so I'm not sure if that's what causes the error. I've already reinstaleld 10.2.1 on my device as I don't have a seperate dev device unfortunately, I'll let you know if the said code works there or not.

 

Thanks,

Daniel

New Developer
Posts: 31
Registered: ‎02-01-2014
My Device: Q10 SQN100-3
My Carrier: Factory Unlocked

Re: MessageService error when requesting conversation info

Just tested on 10.2.1, works just fine. Can someone confirm please that it doesn't work on 10.3.0.700?

New Developer
Posts: 31
Registered: ‎02-01-2014
My Device: Q10 SQN100-3
My Carrier: Factory Unlocked

Re: MessageService error when requesting conversation info