Skip to content

@tauri-apps/plugin-nfc

Source: undefined

AbsoluteURI: 3;

Source: undefined

Empty: 0;

Source: undefined

Media: 2;

Source: undefined

NfcExternal: 4;

Source: undefined

NfcWellKnown: 1;

Source: undefined

Unchanged: 6;

Source: undefined

Unknown: 5;

Source: undefined


Source: undefined

IsoDep: 0;

Source: undefined

MifareClassic: 1;

Source: undefined

MifareUltralight: 2;

Source: undefined

Ndef: 3;

Source: undefined

NdefFormatable: 4;

Source: undefined

NfcA: 5;

Source: undefined

NfcB: 6;

Source: undefined

NfcBarcode: 7;

Source: undefined

NfcF: 8;

Source: undefined

NfcV: 9;

Source: undefined

Source: undefined

Property Type Defined in
format NFCTypeNameFormat Source: undefined
id number[] Source: undefined
kind number[] Source: undefined
payload number[] Source: undefined

Source: undefined

Property Type Description Defined in
keepSessionAlive? boolean - Source: undefined
message? string Message displayed in the UI. iOS only. Source: undefined
successMessage? string Message displayed in the UI when the message has been read. iOS only. Source: undefined

Source: undefined

Property Type Defined in
id number[] Source: undefined
kind string[] Source: undefined
records TagRecord[] Source: undefined

Source: undefined

Property Type Defined in
id number[] Source: undefined
kind number[] Source: undefined
payload number[] Source: undefined
tnf NFCTypeNameFormat Source: undefined

Source: undefined

Property Type Defined in
host? string Source: undefined
pathPrefix? string Source: undefined
scheme? string Source: undefined

Source: undefined

Property Type Description Defined in
kind? ScanKind - Source: undefined
message? string Message displayed in the UI when reading the tag. iOS only. Source: undefined
successfulReadMessage? string Message displayed in the UI when the tag has been read. iOS only. Source: undefined
successMessage? string Message displayed in the UI when the message has been written. iOS only. Source: undefined

type ScanKind =
| {
mimeType?: string;
type: "tag";
uri?: UriFilter;
}
| {
mimeType?: string;
techLists?: TechKind[][];
type: "ndef";
uri?: UriFilter;
};

Source: undefined

{
mimeType?: string;
type: "tag";
uri?: UriFilter;
}

{
mimeType?: string;
techLists?: TechKind[][];
type: "ndef";
uri?: UriFilter;
}
Name Type Description Defined in
mimeType? string - Source: undefined
techLists? TechKind[][] Each of the tech-lists is considered independently and the activity is considered a match if any single tech-list matches the tag that was discovered. This provides AND and OR semantics for filtering desired techs. See https://developer.android.com/reference/android/nfc/NfcAdapter#ACTION_TECH_DISCOVERED for more information. Examples import type { TechKind } from "@tauri-apps/plugin-nfc" const techLists = [ // capture anything using NfcF [TechKind.NfcF], // capture all MIFARE Classics with NDEF payloads [TechKind.NfcA, TechKind.MifareClassic, TechKind.Ndef] ] Source: undefined
type "ndef" - Source: undefined
uri? UriFilter - Source: undefined

const RTD_TEXT: number[];

Source: undefined


const RTD_URI: number[];

Source: undefined

function isAvailable(): Promise<boolean>;

Source: undefined

Promise<boolean>


function record(
format,
kind,
id,
payload
): NFCRecord;

Source: undefined

Parameter Type
format NFCTypeNameFormat
kind string | number[]
id string | number[]
payload string | number[]

NFCRecord


function scan(kind, options?): Promise<Tag>;

Source: undefined

Scans an NFC tag.

import { scan } from "@tauri-apps/plugin-nfc";
await scan({ type: "tag" });

See https://developer.android.com/develop/connectivity/nfc/nfc#ndef for more information.

Parameter Type Description
kind ScanKind -
options? ScanOptions -

Promise<Tag>


function textRecord(
text,
id?,
language?
): NFCRecord;

Source: undefined

Parameter Type Default value
text string undefined
id? string | number[] undefined
language? string 'en'

NFCRecord


function uriRecord(uri, id?): NFCRecord;

Source: undefined

Parameter Type
uri string
id? string | number[]

NFCRecord


function write(records, options?): Promise<void>;

Source: undefined

Write to an NFC tag.

import { uriRecord, write } from "@tauri-apps/plugin-nfc";
await write([uriRecord("https://tauri.app")], { kind: { type: "ndef" } });

If you did not previously call scan with ScanOptions.keepSessionAlive set to true, it will first scan the tag then write to it.

Parameter Type Description
records NFCRecord[] -
options? WriteOptions -

Promise<void>


© 2026 Tauri Contributors. CC-BY / MIT