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
Contributor
Posts: 27
Registered: ‎11-15-2010
My Device: 8350i

FolderListener API bug

[ Edited ]

Hi.  Due to my MMS problems, I started testing a different way to receive my MMS messages.   I just got a new phone, and I'm testing this with an 8350i running 5.0.0.804

 

I started forwarding my MMSs to my work's email account, and due to the enterprise activation, all my emails are downloaded to my phone. For these tests, all my outlook rules were disabled and junk mail turned off. 

 

The weirdest thing is happening... My application works perfectly for normal emails, but the listener is not being triggered for the forwarded MMSs in the form of an email. 

 

When I receive a normal email, it's immediately downloaded to my phone.  My listener method is called and a sound is played (the sound playing is just so I know it is working.. this isn't the goal of the app).

 

When an MMS page is sent to my phone, it is forwarded to my email account as well.  The MMS message stays in my inbox on the exchange server (no rules moving it around or deleting it).  It then reaches my phone in two ways.  The original MMS gets to the phone perfectly fine, and then a couple seconds later it arrives on the phone in the form of an email.

 

Here's a sample of an MMS which has been forwarded to my email account:

From: SNPPRcv
To: +1[my_phone_number]/TYPE=PLMN
Sent: Mon Dec 13 21:24:13 2010

[factory_name]: [work_username]> subject text: ERROR ON DS NODE 5437483824!1!!1 RUN FOR THE HILLS!

Notes: The complete "from" address is what is shown.  Nothing more.  It is not a valid email address. Also, the "to" address is the same as what is shown above, not my email address.  I'm guessing the MMS is being forwarded to me via the BCC field.  I don't know why Nextel's servers send it this way, but it does and it's completely out of my control.  The subject is left blank, but the folder listener does pickup normal emails with blank subjects.

 

 

I just don't understand why this is happening... It has to be a bug on RIM's end, right?

 

A folder listener is placed on the store with the following:

 

 

Session.getDefaultInstance().getStore().addFolderListener(this);

 

 

The class it's in implements the FolderListener interface.

 

I'm looking for an answer to the above question and ways around this.

 

 

Edits: typos/slight rewording

BlackBerry Development Advisor
Posts: 15,264
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: FolderListener API bug

This article likely explains it:

 

Application is not notified when new messages arrive

http://supportforums.blackberry.com/t5/Java-Development/Application-is-not-notified-when-new-message...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Contributor
Posts: 27
Registered: ‎11-15-2010
My Device: 8350i

Re: FolderListener API bug

I may be able to use solution number 2, but my current implementation is solution number 1, and that's the one that refuses to return the specified messages in my first post.  It returns all other messages but those...

BlackBerry Development Advisor
Posts: 15,264
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: FolderListener API bug

Can you confirm that these messages are delivered using a BlackBerry mail service?  Open the message and scroll to the very top.  You should see a "Received Using:" header that lists one of your email accounts.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Contributor
Posts: 27
Registered: ‎11-15-2010
My Device: 8350i

Re: FolderListener API bug

[ Edited ]

They say : "Recieved using: Desktop (Secure)".  It says the same thing for normal emails.

 

 

edit: typo

BlackBerry Development Advisor
Posts: 15,264
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: FolderListener API bug

Could you check if this sample picks it up?

 

Allow a background listener to detect and update a GUI application

http://supportforums.blackberry.com/t5/Java-Development/Allow-a-background-listener-to-detect-and-up...

 

If not... if you reforward this message to yourself, is it picked up?

Allow a background listener to detect and update a GUI application

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Highlighted
Contributor
Posts: 27
Registered: ‎11-15-2010
My Device: 8350i

Re: FolderListener API bug

I'm about 3000 miles away from my development environment till Christmas, so I cannot give you a definite yes or no since I cannot sign the code on my laptop.  

 

I'm reasonably certain that I'll have the same results from your example as I had with mine (since you are listening to the messages the same way I did), but I will check this once I get home.