Samsung Electronics logo

Managing NFC Connectivity



Learning how to enable or disable the NFC service is a basic NFC management skill:

  1. To get the default NFC adapter, use the getDefaultAdapter() method:

     var nfcAdapter = webapis.nfc.getDefaultAdapter();
  2. To enable NFC, use the setPowered() method of the NFCAdapter interface with the first parameter set to true:

    nfcAdapter.setPowered(true, onPowerOn, onPowerOnFails);
  3. To disable NFC, use the setPowered() method with the first parameter set to false:

    nfcAdapter.setPowered(false);