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 Contributor
Posts: 7
Registered: ‎02-20-2011
My Device: 9800
My Carrier: at&t
Accepted Solution

Listener belongs to another application module

hi i try to add NFC listener to app but i always get exception "Listener belongs to another application module"

what that mean? i already check that nothing module contain NFC listener

 

thanks before

Contributor
Posts: 10
Registered: ‎09-19-2011
My Device: bold 9900
My Carrier: T mobile

Re: Listener belongs to another application module

I am facing the same problem. Did you find any solution? Thanks in advance.

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

Re: Listener belongs to another application module

I have not looked at NFC Listener (yet) but I assume it is like other Listeners, it runs in the 'owning' application, like the Phone Listeners run in the Phone application.  In these cases you need to ship the data to your own application, and the preferred way to do that is using Global Events.

http://supportforums.blackberry.com/t5/Java-Development/Global-Events-and-Global-Event-Listeners/ta-...

 

What processing were you actually trying to do in the Listener that provoked this Exception?

 

As noted, I have not looked, perhaps this is completely tosh, if so I'm sorry, I'm just trying to help....

Regular Contributor
Posts: 83
Registered: ‎12-09-2010
My Device: Not Specified

Re: Listener belongs to another application module

Hello,

I've exactly the same problem...

 

It occurs when I set 3 or more Entry point but not when I've only 2.

I register the listener only when I launch my nfc entrypoint (I've added nfc as parameter) but I've got this error.

This error occurs only on the device even if I launch only the nfc entrypoint.

 

When I remove all other entrypoint everything works fine.

 

How can you explain that? My main application (the first defined in descriptor.xml) is my NFC entrypoint so, why did it said me that?

 

Thanks

Contributor
Posts: 10
Registered: ‎09-19-2011
My Device: bold 9900
My Carrier: T mobile

Re: Listener belongs to another application module

I don't think this is a global event as none of the samples in BlackBerry SDK 7.0 implement the GlobalEventListener. We implement DetectionListener in our code. The exception occurs as soon as the listener is registered.

We have a single entry point. The application has a screen with a Start button. On the field change listener of this button, the DetectionListener is registered. This works fine with a single screen. But when we add more screens to the application, it starts throwing the exception unexpectedly after few additions.
New Contributor
Posts: 7
Registered: ‎02-20-2011
My Device: 9800
My Carrier: at&t

Re: Listener belongs to another application module

Hi,

 

i think its not a solution for the problem, but this is in my case:

 

i join my NFC listener (NDEFMessageListener) and screen, so i set NFC listerner in my constructor screen it always throw an exception.

 

so i change to not to set listener in constructor, but i make a function to set the listener : example

 

push(theScreen);

theScreen.StartListener();

 

it work well, but i just for NDEF message listernet, it i use target listener it will throw same exception

Retired
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: Listener belongs to another application module

Hi

 

I think people may have hit an issue known to affect the TransactionListener from the NFC API. I hadn't heard of it for other NFC listeners however. Here's the problem we know about for TransactionListener:

 

If your application gets split into multiple sibling cod files then you may get this issue. The workaround is to have your main application class (sub-class of UiApplication or Application) implement the interface. This should stop you seeing this error.

 

I believe the issue is fixed in later 7.0 builds.

 

If people still have problems after trying this suggestion please post:

- whether or not you have sibling cod files

- whether you see the problem on a real device or simulator

- in either case, which device and what API/OS build you are running with.

 

Thanks

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
Retired
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: Listener belongs to another application module

[ Edited ]

Having checked this further, I can report that for 9900 (Bold) devices the issue should be fixed in OS version 7.0.0.337 (bundle 1603) whilst for 9360 (Curve) it should be fixed at 7.0.0.360 (bundle 1699).

 

If you do hit this problem therefore, you should upgrade devices to this version at a minimum and re-test.

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
New Contributor
Posts: 6
Registered: ‎10-18-2011
My Device: Blackberry Curve 9360
My Carrier: Singtel

Re: Listener belongs to another application module

Hi

 

I testing a small MIDlet on Blackberry Curve 9360 which only registers the TransactionListener to detect if a transaction has been made. I am encountering the ControlledAccessException as soon as I register the listener.

How can I overcome this exception? Is there anyway other than upgrading the firmware?

 

There is no multiple cods created

The device is running on v7.0.0.244

 

Thanks

 

Retired
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: Listener belongs to another application module

Is your MIDlet signed with the NFCR signing key?

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim