01-17-2013 11:57 AM
I'm having some trouble with the SmsTransport api. The listeners for phone and email are simple and work great, but when I try and listen for sms I get this runtime warning: Warning: Object::connect: No such signal bb::pim::message::SmsTransport::messageReceived(un
signed int, const bb::pim::message::Message&) in ../src/App.cpp:58 and this is the code that is the problem: mSmsTransport->registerPort(0); connect(mSmsTransport, SIGNAL(messageReceived(unsigned int, const bb::pim::message::Message&)), SLOT(handleSms(unsigned int, const bb::pim::message::Message&))); Maybe the method signature has changed from what is listed here? https://developer.blackberry.com/cascades/referenc e/bb__pim__message__smstransport.html Also related to this.. is 0 the correct port to register on to listen for SMS's? It worked this way on Java BB but I'm not sure about BB10.
Solved! Go to Solution.
01-17-2013 02:21 PM
Looks like a bug, I've logged the missing signal issue here:
I'm looking into the port question.
01-17-2013 02:28 PM
For the second question, when using SmsTransport, you need to specify a port. But SmsTransport is designed to be used for binary SMS messages sent on a custom port.
If you want to capture regular SMS messages, use MessageService.
01-17-2013 03:57 PM
So are you saying that the messageAdded signal from MessageService should be triggered when a new SMS arrives? That would be great but it is not what I found on the Dev Alpha A. Emails triggered the signal but not sms's.
Would you expect it to work now or do I have to wait for the Hub part of the OS to be enabled in the Jan 30th OS release?
01-18-2013 10:39 AM
Yes, incoming SMS messages should trigger messageAdded and conversationAdded when a new message arrives. messageAdded and conversationUpdated are fired when a reply is received to an existing conversation and messageUpdated is fired when you send a reply.
02-05-2013 03:13 PM
messageAdded works great for both email and sms. Thanks! However messageUpdated doesn't work. In order to connect the signal properly I have to call this line first and currently this line generates a compile error:
Error: 'qt_metatype_id' is not a member of 'QMetaTypeId<bb:im::message::MessageUpdate>'
02-11-2013 11:43 AM
I wasn't able to reproduce that error. Which version of NDK are you using?
02-12-2013 01:57 PM
I also tried in 10.0.10.261 and the previous 10.0.9 release. Does the BlackBerry dropdown in the tool bar point to the appropriate SDK version? If so, can you submit a sample project that reproduces this to Issue Tracker?
02-12-2013 02:38 PM
Patching the SDK at C:\devel\bbndk\target_10_0_9_2318\qnx6\usr\include