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
Developer
Posts: 1,621
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

How listen to SMS and Email?

I want to listen to incoming and outgoing sms and email.

 

where can i find sample codes? thanks

 

Developer
Posts: 313
Registered: ‎05-31-2010
My Device: Alpha 10, Bold 9900, Storm 9530, Tour 9630, Curve 9320, Curve 8900
My Carrier: All

Re: How listen to SMS and Email?

Developer
Posts: 1,621
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: How listen to SMS and Email?

[ Edited ]

thanks.

 

The problem the message app didn't work for me was i had multiple email accounts and the message app selected the wrong account.

 

Developer
Posts: 1,621
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: How listen to SMS and Email?

The message app works for email messges only.

 

how do I listen to sms? do I use the transport class?

Developer
Posts: 313
Registered: ‎05-31-2010
My Device: Alpha 10, Bold 9900, Storm 9530, Tour 9630, Curve 9320, Curve 8900
My Carrier: All

Re: How listen to SMS and Email?

It also has the listener for sms. You need to select the corresponding filter. 




p(^_^)q
Good good study, day day up
Developer
Posts: 313
Registered: ‎05-31-2010
My Device: Alpha 10, Bold 9900, Storm 9530, Tour 9630, Curve 9320, Curve 8900
My Carrier: All

Re: How listen to SMS and Email?

That is just an example. You need to modify it based on your requirement. 




p(^_^)q
Good good study, day day up
Developer
Posts: 1,621
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: How listen to SMS and Email?


javayoung wrote:

It also has the listener for sms. You need to select the corresponding filter. 


Sorry but the doc says PIM messages.  I do not see anywhere in the MessageService mention text message.

Do you have a link to the doc describing text message?  thanks

Developer
Posts: 313
Registered: ‎05-31-2010
My Device: Alpha 10, Bold 9900, Storm 9530, Tour 9630, Curve 9320, Curve 8900
My Carrier: All

Re: How listen to SMS and Email?

Sorry, I made a mistake between SMS and PIM. Thank you for you point out. 




p(^_^)q
Good good study, day day up
Developer
Posts: 20
Registered: ‎11-17-2010
My Device: Dev Alpha A
My Carrier: -

Re: How listen to SMS and Email?

Try the Messages example, select your SMS account from the Dropdown and enter some text like an "e" as  filter. You will see your SMS messages appear. The way the filter is configured in the example for some reason does not work properly for SMS if it is empty.

 

 

Developer
Posts: 313
Registered: ‎05-31-2010
My Device: Alpha 10, Bold 9900, Storm 9530, Tour 9630, Curve 9320, Curve 8900
My Carrier: All

Re: How listen to SMS and Email?

[ Edited ]

Can we use SMSTransport API to register a Port and listen it? 

 

Similar as this post before: http://supportforums.blackberry.com/t5/Cascades-Development/Sms-listening-using-Cascades-SmsTranspor...

 

The above case is for customized sms port. Msohm said "If you want to capture regular SMS messages, use MessageService." , it seems like you still need to look through the sample code of messages. 




p(^_^)q
Good good study, day day up