Ok, for #1 I'll just keep trying the card and see if I can manage to talk to
it.
For the additional issues, the sequence of events and relevant code is as
follows:
I scan a card with my app set to receive the scans. The appropriate Activity
opens, retrieves a Tag object, and executes an AsyncTask.
The AsyncTask determines the card technology and based on the card
technology, attempts to open a connection to that card as follows:
private static NfcB getNfcBTag(Tag tag) throws Exception
{
NfcB myTag = NfcB.get(tag);
try
{
if(!myTag.isConnected())
{
myTag.connect();
}
}
catch(Exception e)
{
Log.e(TAG, e.getMessage());
}
return myTag;
}
The above method throws an exception on myTag.connect(). The exception is a
java.IOException, but the message and source are both null, so I have no
idea why it's happening. Now, if I change this method to be IsoDep instead
of NfcB (or NfcA, for that matter), I am able to successfully connect to the
card, send a message to the card, and retrieve a response from that card.
-- Paul Christensen
On Sun, Mar 6, 2011 at 10:06 PM, Nick Pelly <[email protected]> wrote:
> Hi Paul,
>
> For (1), it is very hard to discover NfcB credit card on the Nexus S. Many
> NfcB credit cards only work well with high powered readers. That said, if
> you play with the credit card orientation against the back of the Nexus S
> (where the NFC antenna is) you should be able to eventually scan it.
>
> For (2), (3) and (4), can you provide some sample code, and tell us exactly
> where it is failing.
>
> Nick
>
>
> On Fri, Mar 4, 2011 at 10:30 AM, Paul Christensen <
> [email protected]> wrote:
>
>> Ok, so I've learned additional, somewhat less than encouraging things.
>>
>> 1. I have a Discover "Zip" card, no idea what the ISO technology is,
>> all I do know is the Nexus S does not respond at all to this card.
>> 2. I have a Visa NfcB card that will connect as IsoDep, but not as
>> NfcB.
>> 3. I have an Amex NfcB card that will connect as IsoDep, but not as
>> NfcB.
>> 4. I have a MasterCard NfcA card that will connect as IsoDep, but not
>> as NfcA.
>>
>> Any thoughts would be greatly appreciated.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en