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

Java Development

Reply
New Developer
Posts: 21
Registered: ‎03-04-2009
My Device: Not Specified

Listening for emails AND how to distiguish between MMS and SMS?

I am in need of how to listen for new emails (i know how to get the email addresses from the service books but i dont see any listeners) and i also need to know the simplest way to distiguish between an MMS and a SMS (i am listening for them using datagram and it works nicely)

 

Thanks!

Developer
Posts: 52
Registered: ‎07-17-2008
My Device: Not Specified

Re: Listening for emails AND how to distiguish between MMS and SMS?

New Developer
Posts: 21
Registered: ‎03-04-2009
My Device: Not Specified

Re: Listening for emails AND how to distiguish between MMS and SMS?

That answers the question about the emails, what about the MMS and SMS?
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Listening for emails AND how to distiguish between MMS and SMS?

From the KnowlegeBase:

 

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

 

I suggest using the Datagram connection rather than MessageListener, as Message conneciton allows only one application at a time (first one wins).

 

AFAIK, there is no similar method for MMS yet.

 

Highlighted
Developer
Posts: 52
Registered: ‎07-17-2008
My Device: Not Specified

Re: Listening for emails AND how to distiguish between MMS and SMS?

[ Edited ]

Here's an example-

 

 

http://www.blackberry.com/developers/docs/4.5.0api/javax/wireless/messaging/MessageListener.html

 

Port 6222 is used in this example.  If I remember correctly, the default SMS port is 0.

 

smsConnection = (MessageConnection) Connector.open("sms://:0");

 

I am not sure about MMS.

 

......................

 

Opps...  RexDoug beat me to the answer!

 

 

 

 

Message Edited by akirekadu on 03-07-2009 09:02 PM
Message Edited by akirekadu on 03-07-2009 09:02 PM
Message Edited by akirekadu on 03-07-2009 09:03 PM
New Developer
Posts: 21
Registered: ‎03-04-2009
My Device: Not Specified

Re: Listening for emails AND how to distiguish between MMS and SMS?

well it seems to me that it is reading MMS as an SMS but ill do more testing. I looked at the folder listener to get the email events but i cant figure out exactly how thats supposed to work. Anyone have a short tutorial?
Developer
Posts: 52
Registered: ‎07-17-2008
My Device: Not Specified

Re: Listening for emails AND how to distiguish between MMS and SMS?

As for MMS,  per this thread, you cannot listen for all incoming MMS messages.  You need app ID to be able to receive an MMS (meaning you can receive only MMS messages sent by your own application running on another phone.)

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=15343&query.id=17...

 

 

Contributor
Posts: 27
Registered: ‎11-15-2010
My Device: 8350i

Re: Listening for emails AND how to distiguish between MMS and SMS?

I know this post is old, but an application called "BerryBuzz" has a fully functional MMS listener playing reminder notifications until you view your MMS inbox.

 

If it is impossible to have an MMS listener, how does this app send reminder notifications to the user once an MMS is received?  I tried it on my phone, and it works perfectly.