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: 37
Registered: ‎10-10-2008
My Device: Not Specified

unauthorized attempt to attach to this application

Does any one know what any of these errors mean? or what would usually throw such exceptions

 

"unauthorized attempt to attach to this application"?

 

 

"unauthorized attemt to monitor keypresses"?

 

Thanks

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

Re: unauthorized attempt to attach to this application

These can occur if an application attempts to add a KeyListener to a screen it does not control (a screen from another 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
Developer
Posts: 27
Registered: ‎11-18-2008
My Device: Not Specified

Re: unauthorized attempt to attach to this application

Did anyone get a workaround for this? I am seeing this issue on what should be a very straight forward thing to do. I have wrote an application using JDE 4.2.1 and everything runs great in the simulator that comes with the JDE, 8800 simulator in my case. Now when I deploy the application to my device an 8830 running 4.2.2.176 when I try to add a keylistener to my popupscreen it throws that same error "Unauthorized attempt to monitor key presses". So simply I am trying to add a keylistener to a popupscreen which my application owns and this error is thrown. Now I have tried a variety of things from making sure my app requests foreground to putting the code to add the keylistener into a invokelater thread and nothing changes. I cant believe that a bug of this magnitude was deemed acceptable to leave. If anyone can shed light on how to simply add a keylistener to anything at this point that works on a handheld I would be very greatful.

 

Thanks!

Highlighted
BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: unauthorized attempt to attach to this application

From where are you launching your PopupScreen from?  From within your application that the user has launched (and has entered the event dispatcher) or from a listener?  Note that listeners can be fired by other processes, which is what triggers this exception. 

 

This is by design.  The reason you don't see this in the BlackBerry Simulator is that they run in an unsecured mode that bypasses certain security checks (code signing, firewall checks, application control checks, etc...).  You can change this setting in the BlackBerry Simulator preferences in the BlackBerry JDE.  Note that you'll need to delete the .dmp files from the BlackBerry Simulator directory after toggling this setting.

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