OSDN Git Service

Improve NDEF API's
authorNick Pelly <npelly@google.com>
Thu, 5 Jan 2012 04:13:01 +0000 (15:13 +1100)
committerNick Pelly <npelly@google.com>
Wed, 25 Jan 2012 21:17:19 +0000 (13:17 -0800)
commitc97a552023c3c71079b39092e80c9b44f25a789b
tree639e700cdd538f2ebd080143182fa30bb32fdd2a
parentdc828acd5fadb266b13cce459b1cacfad8ef7aef
Improve NDEF API's

o Add NdefRecord.toMimeType()
  Maps the record to a MIME type
o Add NdefRecord.toUri()
  Maps the record to a URI
o Add hidden NfcAdapter.dispatch()
  Helps test the dispatch path.
o Modify createMime(), createUri() and createExternal():
  Do not try and strictly follow RFC requirements for URI or MIME content
  types. This just leads to heartbreak - the RFC requirements are too strict.
  For example RFC1341 forbids the use of '.' in a MIME type, however this is in
  common use in types such as "application/vnd.companyname". I think the best
  approach is to only remove 'obvious' whitespace issues, and to convert
  uppercase to lowercase as per Android guidelines.

Change-Id: Id686f5f3b05b2dceafad48e1cfcbdb2b3890b854
Android.mk
api/current.txt
core/java/android/nfc/INfcAdapter.aidl
core/java/android/nfc/NdefMessage.java
core/java/android/nfc/NdefRecord.java
core/java/android/nfc/NfcAdapter.java