Languages

Menu
Sites
Language
Gear S2 의 지원기능에 대해...

1. NFC 읽기/쓰기 모두 가능한가요?

2. WIFI에 직접 연결 가능한가요?

Responses

1 Replies
Armaan-Ul- Islam

Hello,

1)

This guide would be helpful for NFC read/write you want to perform:

NFC: Managing an NFC Device and Detecting NFC Tags and Peers

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

Additionally, I am just giving you a summary of how to do a read/write operation between NFC devices.Please go through the document for more details level implementation or to implement other available features.

At first make the NFC on.

Samsung GearS2 ->Settings->Connections-> NFC->On

/*Add privileges in config.xml  */

<tizen:privilege name="http://tizen.org/privilege/nfc.p2p"/>

/*.....
  Similary all the required privileges*/


/* NFC peer connect example*/

var adapter = tizen.nfc.getDefaultAdapter();

 var onSuccessCB = {onattach : function(nfcPeer) {
     console.log("NFC Target is detected");
   }, ondetach : function() {
     console.log("NFC Target is detached");
   }};
   
 adapter.setPeerListener(onSuccessCB);
 
/* Build & send Message example*/

var newMessage = new tizen.NDEFMessage();

var newRecord = new tizen.NDEFRecordText(“Hello Tizen”, en-US);
newMessage = new tizen.NDEFMessage(); 
newMessage.records[0] = newRecord;

Peer.sendNDEF(newMessage);


/* Recieve Message example*/

function readMessage(message)
{
    console.log("Record Count is " + message.recordCount );
}
Peer.setReceiveNDEFListener(readMessage);

See API reference for further development :

NFC API

https://developer.tizen.org/ko/development/api-references/web-application?redirect=https%3A//developer.tizen.org/dev-guide/2.3.1/org.tizen.web.apireference/html/device_api/wearable/tizen/nfc.html&langredirect=1

 

2)

To connect directly to a WiFi network:  

Firstly make the WiFi on.

Samsung GearS2 ->Settings->Connections-> Wi-Fi->On

Connect to the WiFi network you want to connect:

Samsung GearS2 ->Settings->Connections-> Wi-Fi-> Wi-Fi networks->Scan-> yourWifiNetwork->Connect

Thank you.

If found helpful Please mark it as the Best Answer to promote & help others to solve similar issues.