3. Near Field Communication,NFC
• 近場通訊(英語:Near Field Communication,NFC),又稱近距
離無線通訊,是一種短距離的高頻無線通訊技術,允許電子裝置
之間進行非接觸式點對點資料傳輸,在十公分(3.9英吋)內交換
資料。
• 這個技術由非接觸式射頻識別(RFID)演變而來,由飛利浦半導
體(現恩智浦半導體)、諾基亞和索尼共同研製開發。
14. Android has the most support for the NDEF
standard
• The data stored in the tag can also be written in a variety of formats,
but many of the Android framework APIs are based around a NFC
Forumstandard called NDEF (NFC Data Exchange Format).
• Android has the most support for the NDEF standard, which is
defined by the NFC Forum.
15. NDEF
NDEF data is
encapsulated inside a
message (NdefMessage)
that contains one or
more records
(NdefRecord). Each
NDEF record must be
well-formed according
to the specification of
the type of record that
you want to create.
16. Obtaining information from intents
• If an activity starts because of an NFC intent, you can obtain
information about the scanned NFC tag from the intent.
• NdefMessage被封裝在intent裡面,activity 就是透過tag 所傳的
intent被trigger起來。
31. NDEF
NDEF data is
encapsulated inside a
message (NdefMessage)
that contains one or
more records
(NdefRecord). Each
NDEF record must be
well-formed according
to the specification of
the type of record that
you want to create.
37. References
• Android* 上的 NFC 應用程式開發 (多件個案研究) - Intel Dev Zone
• NFC on Android
• Android - 學習操作NFC – 1
• Android - 學習操作NFC – 2
• 近場通訊 - wiki
Editor's Notes
在自己做的APP讀取tag裡面的資訊
Intent-filter會幫你篩選出妳想要接收的tag,因為有可能妳設計的app是專門接收某些資訊;這段code是幫我們篩選出NDEF格式的訊息,資料內容也可做篩選,這裡是只要是文字就可以被我們讀到。
Intent to start an activity when a tag with NDEF payload is discovered.