If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
arun_s
Posts: 8
Registered: ‎10-07-2011
My Device: Storm
My Carrier: AT&T

Reading credit card data- NFC application development

Hello All,

 

I am trying to write an application that reads a (NFC enabled) credit card and related data using the NFC APIs available for BB OS7. My application implements the NDEFMessageListener and DetectionListener interface, but there's no activity when I bring a card close to the NFC antenna. Is there something I am overlooking?

 

Do I also need to implement the TransactionListener interface and use the SecureElementManager and related classes? I could not come across a whole lot of information to guide me through this, unfortunately.

Please use plain text.
BlackBerry Development Advisor (Retired)
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: Reading credit card data- NFC application development

There could be a number of explanations for the lack of apparent NFC activity.

 

- Is NFC switched on in the "Manage Connections" screen on your device (forgive the obvious question)

- have you witnessed *any* NFC activity with other targets such as for example a basic smart poster with this device? Worth checking this in case your device is actually faulty. Please tell me the PCB number on the reverse side of the battery door of your device. Also, please  look for a 5 digit CPR number within the battery compartment. Send these to me as a private message so I can investigate your device.

 

I doubt NDEFMessageListener is appropriate for a credit card. I would expect DetectionListener to register the presence of the card however.

--------------------------------------------------------------------------------------------
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
Please use plain text.
BlackBerry Development Advisor (Retired)
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: Reading credit card data- NFC application development

From the device details provided, I believe your hardware is fine.

 

So that leaves my other comments and questions. What do you think?

--------------------------------------------------------------------------------------------
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
Please use plain text.
New Contributor
arun_s
Posts: 8
Registered: ‎10-07-2011
My Device: Storm
My Carrier: AT&T

Re: Reading credit card data- NFC application development

Hello,

 

I just got my hands on a BlackBerry 9360 (Curve) and I'm trying to  work on the same application- to get a NFC enabled card to be read by an application I am developing.

 

I did manage to get going this time, with my card being successfully detected. However, I get an IOException each time I call the connection.transceive() method, the message being "Error exchanging ISO14443-4 data : Invalid handle".

 

The Target object does seem to have a valid URI associated with it, if that helps.

Please use plain text.
BlackBerry Development Advisor (Retired)
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: Reading credit card data- NFC application development

Do you know for sure the card supports layer 4? Some NFC cards/tags only support up to layer 3.

 

What is the purpose of you wanting to read a credit card by the way?

--------------------------------------------------------------------------------------------
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
Please use plain text.
New Contributor
arun_s
Posts: 8
Registered: ‎10-07-2011
My Device: Storm
My Carrier: AT&T

Re: Reading credit card data- NFC application development

Thanks for the reply. I do make a check if the Target type is ISO14443-4 and it does return true.

 

My intention of reading a credt card is to obtain information like card numer, name, etc. for my application.

Please use plain text.
BlackBerry Development Advisor (Retired)
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: Reading credit card data- NFC application development

I don't know enough about credit cards but suspect that you will not be able to read them direct like this. Have you looked at the EMV specifications?

--------------------------------------------------------------------------------------------
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
Please use plain text.
New Contributor
arun_s
Posts: 8
Registered: ‎10-07-2011
My Device: Storm
My Carrier: AT&T

Re: Reading credit card data- NFC application development

The command I'm sending seems to be fine, the problem is the invalid connection handle.

 

I also have a J2ME version of the app and an Android version, the same command seems to work just fine.

Please use plain text.
BlackBerry Development Advisor (Retired)
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: Reading credit card data- NFC application development

Could you send me the following as a private message with attachment please?

 

Precise OS version you are running on as shown in Options-About

Your source code.

 

I'll take a look and see if I can advise.

 

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
Please use plain text.