08-23-2012 11:01 AM
08-23-2012 11:03 AM - edited 08-23-2012 11:04 AM
remove these lines:
// [DNT] 09/26/09 - Item#1.5
//message.setFlags(Message.Flag.OPENED | Message.Flag.DELETED);
and move them into the globalEventReceived method.
08-23-2012 11:05 AM - edited 08-23-2012 11:07 AM
OK, it looks like the code you posted previously is actually already being run in your app context.
The code that is being run in the Listener is just the
method from your IncomingMail.
So I think the delete we see that causes the problem is actually the one in there.
So you can try what i suggested yesterday, which is to comment the delete out and see if the failure continues to happen.
I suspect it won't. so all you have to do is move the delete (and the 'OPEN' marking I suggest) into your global handler.
A lot can happen while you are gettign a cuppa I see... Ah well, at least we all agree!
08-23-2012 11:37 AM
08-23-2012 11:50 AM
I'm starting to think Blackberry doesn't like me much... I made the changes to the code, repackaged and deployed on my test phone. I'm now getting a pop-up when I try to open the GUI that states: Application terminated: Precision Collector has been denied the "Cross Application Communication" permission. I didn't change anything other than the version number (bumped up by 1) and I commented out the lines we discussed....
I'm uninstalling now so I can reinstall and see if it happens again.... Good times
08-23-2012 12:02 PM
That one is defined in the application permissions (or application control policy if you are still using the BES). To modify it go to Options -> Applications -> select your app and choose Edit Permissions.
If you are using javaloader to load from a command line, specify the JAD file instead of COD files. Loading COD files directly can cause these types of permission errors. Or if you are using the BlackBerry Java Plug-in for Eclipse you can right click on the project and choose BlackBerry -> Load on device.
08-23-2012 12:03 PM - edited 08-23-2012 12:10 PM
Options (spanner icon) --> Device -- Application Management (you might have to scroll to find this). Look for your app. click on it, then Edit Permissions. You should be able to change the permissions.
Edit: Quck draw Mark......
08-23-2012 12:08 PM
How was the application installed?