NDefDecoder
com.rvi.application.NDefDecoder · Class · SocialCard 1.0.3
Read supported typed records from an NDEF message in record order.
When to use it
Section titled “When to use it”Pass a validated NDefMessage to decode() for all typed content, or decodeURIs() for URI strings. For raw tag-memory bytes, unwrap the TLV first with TlvDecoder.
Java example
Section titled “Java example”final NDefMessage message = new NDefEncoder().encodeURIs( List.of("https://rithush.dev", "mailto:help@example.com"));final List<String> links = new NDefDecoder().decodeURIs(message);
System.out.println(links);Java imports
import com.rvi.application.NDefDecoder;import com.rvi.application.NDefEncoder;import com.rvi.domain.NDefMessage;import java.util.List;Use decode() when your application also needs text, contacts or Wi-Fi information.
How it works
Section titled “How it works”The decoder interprets record headers and converts payloads into values. It expands URI prefixes, reads the text language field and parses supported vCard and Wi-Fi credential payloads. decode() returns an immutable list and may reject a payload that passes structural validation.
Related API
Section titled “Related API”NDefEncoder · NDefMessage · NDefContent · TlvDecoder · NDefMessageException