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: 2
Registered: ‎04-03-2012
My Device: 9900

NFCFieldListener

Hi Guys,

 

Anybody have used NFCFieldlistener? I am building an application require actions when leaving the NFC field, I implemented this:

    public class NfcListener implements NFCFieldListener{
        public void onFieldChanged(final int fieldEvent)
        {

            UiApplication.getUiApplication().invokeLater(new Runnable() {
                
                public void run() {
                    if( fieldEvent == NFCFieldListener.Field_NOT_PRESENT )

                                  //DO WHATEVER
                }
            });
        }
    }

 

But,

myNFCManager = NFCManager.getInstance();
myNFCManager.addNFCFieldListener( new NfcListener());

 

Never triger the listener no matter what I do with the NFC tag.

 

Any suggestions?

 

Thanks,

New Contributor
Posts: 2
Registered: ‎04-03-2012
My Device: 9900

Re: NFCFieldListener

somebody please help :smileytongue:

New Contributor
Posts: 3
Registered: ‎11-23-2012
My Device: BlackBerry Bold 9900

Re: NFCFieldListener

Hi, I've the same problem and I'll apreciate any answer too.

 

Regards