<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁 > 手機與無線通信 > 設計應用 > Android NFC架構分析

          Android NFC架構分析

          作者: 時間:2012-04-17 來源:網(wǎng)絡 收藏

          中對的實現(xiàn)代碼分布在如下幾個地方:

          本文引用地址:http://www.ex-cimer.com/article/155091.htm

          ./frameworks/base/core/java/android/nfc/

          ./frameworks/base/core/java/android/nfc/tech

          ./frameworks/base/core/java/com/android/internal/nfc/

          ./external/libnfc-nxp

          ./packages/apps/nfc

          其中

          ./external/libnfc-nxp是用C語言編寫的函數(shù)庫,編譯生成libnfc和libnfc_ndef兩個函數(shù)庫。libnfc是一個主要的庫,實現(xiàn)了 Stack的大部分功能,主要供的服務進程調用。

          libnfc_ndef是一個很小的函數(shù)庫,主要是實現(xiàn)NDEF消息的解析,供Framework調用。

          ./packages/apps/nfc是一個類似于電話本的應用程序,但這個程序在手機開機后自動啟動,一直運行,是作為NFC的服務進程存在的。是NFC中的核心。

          ./frameworks/base/core/java/android/nfc/,./frameworks/base/core/java/android/nfc/tech和./frameworks/base/core/java/com/android/internal/nfc/這三個目錄

          實現(xiàn)了NFC的應用接口,其中./frameworks/base/core/java/com/android/internal/nfc/是一些內部類或結構,不對外開放,僅供./frameworks/base/core/java/android/nfc/和

          ./frameworks/base/core/java/android/nfc/tech中的類調用。

          ./frameworks/base/core/java/android/nfc實現(xiàn)了接口包com.android.nfc,./frameworks/base/core/java/android/nfc/tech實現(xiàn)了接口包com.android.nfc.tech.

          圖示如下:

          附錄:

          NFC Service的說明

          NFC: Move NFC service implementation out of system_server.

          NFC service is now an application service in packages/apps/Nfc.

          NFC service is registered through ServiceManager.addService(), and the proxy object NfcAdapter obtains a handle to it through

          ServiceManager.getService().

          **Important** Had to add new symbols AID_NFC / NFC_UID / android.uid.nfc and modify service_manager.c, Process.java and PackageManagerService.java

          in order to force the com.android.nfc process to take a fixed uid, so that it can use ServiceManager.addService().

          Most of the JNI has moved to packages/apps/Nfc/jni. However NdefRecord and NdefMessage require some in-process native code, so

          android_com_NdefMessage.cpp and android_com_NdefRecord.cpp stay in frameworks/base/core/jni. They link to a very small library libnfc_ndef.so

          that implements NDEF message parsing. This has been added to core.mk so all devices (even without NFC hardware) can work with NDEF data.



          關鍵詞: 分析 架構 NFC Android

          評論


          相關推薦

          技術專區(qū)

          關閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();