Class: NFCReader

NFCReader(serveraddress)

NFC On Browserのメインクラス

Constructor

new NFCReader(serveraddress)

Parameters:
Name Type Description
serveraddress String NFCプロキシのサーバーアドレス
Source:
Example
const ncob = new NFCReader("http://localhost:9235")

Methods

accessible() → {boolean}

サーバーが動いているかの確認を行うメソッド
Source:
Returns:
サーバーに到達可能か、True/Falseを返す
Type
boolean
Example
ncob.accessible();

(async) scan() → {string}

スキャンを実行するメソッド
Source:
Returns:
NFCタグに書き込まれたレコードを返す
Type
string
Example
ncob.scan();

(async) write(content) → {string}

NFCタグへの書き込みを行うメソッド
Parameters:
Name Type Description
content String 書き込む内容
Source:
Returns:
NFCタグに書き込まれたレコードを返す
Type
string
Example
ncob.write("Hello World!");