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
Developer
Posts: 47
Registered: ‎06-05-2009
My Device: Not Specified

Existing application which listened to BB inbox in a global listener has stopped working in OS7

Hi,

An existing Java client application which has both a GUI and a background listener which monitors the BB's mail inbox and processes messages has stopped working after being recompiled against OS 7 SDK and deployed to OS7 BB devices.   The problem appears to be security related.

 

Is is still possible to attach global listeners to the BB inbox which remove messages from the inbox and also add messages to the BB Outbox?

 

Thanks

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Existing application which listened to BB inbox in a global listener has stopped working in OS7

Sorry I don't have experience of this with OS 7 but I had a similar issue processing PIN messages, which worked fine in OS 5.0 and failed in OS 6.0.  The issue in that case was the application context, in other words I was doing too much processing using the listener without swapping to my own application context, where my application did have permission.  I context switched to this application to do the processing, and this resolved the issue. 

 

Your case may be a little different because it appears you have two applications I presume you have an alternate entry and another application you start to manage the background processing.  I only had one UiApplication which started in the background.  But I suspect if you just do as little processing as you can in the Listener and swap to your Application then this might help the problem.

 

What error do you see? 

Developer
Posts: 47
Registered: ‎06-05-2009
My Device: Not Specified

Re: Existing application which listened to BB inbox in a global listener has stopped working in OS7

Hi, 

How do I "swap processing to my application"?   From what I understand, UI applications can't be launched or execute in the background so I can't see how this would solve my problem.

I assume the suggestion is to defer the processing until the UI application is launched by the user.

 

It appears that the issue is security related. The security exception is thrown when attempting to iterate through the inbox subfolders to scan through email messages. The error is not encountered when the BB is not connected to a BlackBerry enterprise server.

 

Thanks

 

 

Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Existing application which listened to BB inbox in a global listener has stopped working in OS7

Some responses to comments:

 

"The error is not encountered when the BB is not connected to a BlackBerry enterprise server"

I suspect it would be if permissions were not set. 

 

"How do I "swap processing to my application"?"

The standard method is to have a Global Listener in your UiApplication and fire a Global Event in your Listener. 

 

"I assume the suggestion is to defer the processing until the UI application is launched by the user."

Not necessarily, you could have your Application processing running all the time.

 

"UI applications can't be launched or execute in the background"

Not correct.  You have a number of UiApplications running in the background of your phone at all times, press and hold the BlackBerry "Menu" button to see them in the task switcher. 

 

Your problem may or may not be similar to the one I described.  I suspect it is not the same, since you have now clarified that the problem only happens on DES connected device.  So I think the next thing we need to know is what security exception you are actually getting.