NFC Flashcards

1
Q

What is NFC?

A

A set of short-range wireless technologies which allow you to share small payloads of data between an NFC tag & Android device or between 2 Android devices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the 3 modes of operations simultaneously supported by Android devices with NFC?

A
  1. Reader/Writer mode: NFC device can read/write a passive NFC tag
  2. P2P mode: NFC device can exchange data with other NFC peers
  3. Card Emulation mode: NFC device can act as an NFC card, then be accessed by another NFC reader
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the 2 major use cases when working with NDEF data and Android?

A
  1. Reading NDEF data from NFC tags
  2. Beaming NDEF from one device to another
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How should you develop your activity given that the NFC communications occur in a very short distance?

A

You should develop your activity to only handle the data you care about and prevent activity chooser from appearing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How does the tag dispatch system work in 3 steps?

A
  1. Parses the NFC tag, then figures out the MIME type/URI and the payload
  2. Encapsulates the MIME type/URI and the payload into an intent
  3. Starts an activity based on the intent
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How is NDEF data structured when coming to Android?

A

It has a NdefMessage which has one or more NdefRecords. Each NdefRecord much follow NDEF specification.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does a well formatted NDEF data contain in the first NdefRecord in the NdefMessage?

A
  1. 3-bit Type Name Format
  2. Variable Length type
  3. Variable Length ID
  4. Variable Length payload
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does 3-bit TNF(Type Name Format) do?

A

It acts as an indicator on how to interpret the variable length type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does variable length type do?

A

It describes the type of the record, if TNF is “TNF_WELL_KNOWN”, use this field to specify RTD(Record Type Definition)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does variable length ID do?

A

It uniquely identifies a record

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does variable length payload do?

A

It contains the actual payload data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the 3 types of intent that could be sent as a result of NFC tag scan?

A
  1. ACTION_NDEF_DISCOVERED
  2. ACTION_TECH_DISCOVERED
  3. ACTION_TAG_DISCOVERED
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the 3 TNF that will fall back to ACTION_TECH_DISCOVERED intent?

A
  1. TNF_EMPTY
  2. TNF_UNCHANGED
  3. TNF_UNKNOWN
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the 4 RTD that will fall back to ACTION_TECH_DISCOVERED intent?

A
  1. RTD_ALTERNATIVE_CARRIER
  2. RTD_HANDOVER_CARRIER
  3. RTD_HANDOVER_REQUEST
  4. RTD_HANDOVER_SELECT
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How are NFC tags are dispatched by the system?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the 3 things you need to declare in the AndroidManifest.xml to access NFC functionalities?

A
  1. ””””””
  2. 3.