Languages

Menu
Sites
Language
Gear S3 NFC Tag Support

Does the Samsung Gear S3 Classic or Frontier support the NFC Tag Library?  When executing the code below, I get a "Tag not supported" exception.  I have NFC enabled in the settings and the nfc.common and nfc.tag priveleges enabled in the manifest.

try
    {
        // get default adapters
        nfcAdapter = tizen.nfc.getDefaultAdapter();
        
        listeners =
        {
           onattach: function(nfcTag)
           {
              alert("NFC Tag's type is " + nfcTag.type);
              console.log("NFC Tag's type is " + nfcTag.type);
           }, 
           ondetach: function() 
           {
              console.log("NFC Tag is detached");
              alert("NFC Tag is detached");
           }
        };
        
        nfcAdapter.setTagListener(listeners);
    }
    catch (e) {
        alert(e.message);
        console.log(err.name + ": " + err.message);
    }
    
} () );

 

Edited by: Matthew Smith on 24 Jan, 2017

Responses

11 Replies
Iqbal Hossain

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

var nfcAdapter = tizen.nfc.getDefaultAdapter();

2. Define the event handlers for NFC tag detection using the NFCTagDetectCallback listener interface (in mobile andwearable applications):

var setTagDetect =
{
   /* When an NFC tag is detected */
   onattach: function(nfcTag)
   {
      console.log("NFC Tag detected. Its type is: " + nfcTag.type);
   }

   /* When an NFC tag becomes unavailable */
   ondetach: function()
   {
      console.log("NFC Tag unavailable");
   }
}

 

For more, follow

https://developer.tizen.org/development/tutorials/web-application/tizen-features/network/nfc#Detecting_NFC_Tags

Iqbal Hossain

3. Register the listener to use the defined event handlers.

You can limit the listener to detect only specific NFC tag types by defining the tag types as the second parameter of thesetTagListener() method. In the following example, only MIFARE tags are detected.

/* Defines the tag types to be detected */
var tagFilter = ["MIFARE_MINI", "MIFARE_1K", "MIFARE_4K", "MIFARE_ULTRA", "MIFARE_DESFIRE"];

/* Registers the event listener */
nfcAdapter.setTagListener(setTagDetect, tagFilter);

4. To stop the tag detection, use the unsetTagListener() method:

nfcAdapter.unsetTagListener();

NFC peers are detected similarly as NFC tags, except that the setPeerListener() method is used to register theNFCPeerDetectCallback listener interface (in mobile and wearable applications), and the unsetPeerListener()method is used to stop the peer detection.

 

-Thanks

Matthew Smith

Have you been able to read a tag on a Gear S3?  For me, the setTagListener() returns "Tag not supported".  Is there a matrix or reference available that lists the capabilities of the device.

Iqbal Hossain

What is your NFC host ? 
 

Matthew Smith

Sorry for the naive question, but what do you mean by NFC host?  I am new to using NFC and the Tizen library.  I am building an app that runs on the Gear S3 watch and my goal is to detect information on an NFC tag. 

Iqbal Hossain

Your Gear S3 is a device for which you are developing an app to detect NFC tag. But you need another device which is your peer device. And these 2 devices will be able to listen one another by NFC. That was i asking you, what is your peer device ? And for that device which NFC app are you using? 

Peter Hulst

I'm trying to do the same thing and am running into the same issue. 

"NotSupportedError: Tag is not supported"

Is it possible to read an NFC card with the S3? Matthew have you been able to get this to work? 

thanks

Matthew Smith

Hi Pete r- I did not get this to work.  To my knowledge, itt is not possible to read an NFC tag with the S3.  

André Reus

Check the table for device compatibility list. According to that table Gear S2, S3 doesn't support NFC tag and NFC peer-peer due to hardware limitations....

http://developer.samsung.com/gear/develop/device-compatibility 

J. Schwartz

I know that it doesn't support those things. But I cannot understand why. There is a NFC-Chip integrated that can be used for payment, so it should have the functionalities. So is the functionality disabled for any reason or is it really impossible cause the installed hardware to provide it.

J. Schwartz

Could anybody from Samsung tell us why this feature is not supported?