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
My Carrier: Rogers

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,

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

Re: NFCFieldListener

somebody please help Smiley Tongue

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

Re: NFCFieldListener

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

 

Regards