Warning Older Docs! - You are viewing documentation for a previous released version of RhoMobile Suite.

NFCTagTechnology_Ndef API

Subset of NFCTagTechnology class.

As of Rhodes version 3.3.3, the Barcode, NFC, and Signature Capture APIs, as well as Rhom data encryption are removed from Rhodes. These features are only supported in Zebra RhoMobile Suite. If you wish to use these features, you will need to upgrade to RhoMobile Suite. Your application’s build.yml will also need to be modified to indicate the application type is ‘Rhoelements’. Additionally, a RhoElements license is required.

Enabling NFC

To use the NFC methods, you need to enable NFC on the Android device and ensure that the version is 2.3.3 or later. Do this by adding that capability to the build.yml file:

android: 
  version 2.3.3
  extensions:
  - nfc

Types

MIFARE_CLASSIC = 'com.nxp.ndef.mifareclassic'
NFC_FORUM_TYPE_1 = 'org.nfcforum.ndef.type1'
NFC_FORUM_TYPE_2 = 'org.nfcforum.ndef.type2'
NFC_FORUM_TYPE_3 = 'org.nfcforum.ndef.type3'
NFC_FORUM_TYPE_4 = 'org.nfcforum.ndef.type4'

get_max_size

Returns int – Maximum size of the Ndef tag.

is_writable

Returns true if the Ndef tag is in read-write status, false otherwise. NFC Forum tags can be in read-only or read-write states. Does not cause any RF activity.

Rho::NFCTagTechnology_Ndef.is_writable

can_make_read_only

Returns true if the Ndef tag can be made read only, false otherwise.

Rho::NFCTagTechnology_Ndef.can_make_read_only

make_read_only

Returns true if the Ndef tag is made read only, false otherwise.

Rho::NFCTagTechnology_Ndef.make_read_only

get_type

Returns a string containing the type of the Ndef tag.

Rho::NFCTagTechnology_Ndef.get_type

read_NdefMessage

Returns NdefMessage – the message read from the Ndef tag.

Rho::NFCTagTechnology_Ndef.read_NdefMessage

write_NdefMessage

Writes an NdefMessage to an Ndef tag.

Rho::NFCTagTechnology_Ndef.write_NdefMessage(msg)
msg an NdefMessage written to an Ndef tag.
Back to Top