Skip to content

NDefTextCreator

com.rvi.application.creator.NDefTextCreator · Class · SocialCard 1.0.3

Build a text record and optionally specify its language.

Set the message with text(). Call language() if the text uses a language other than the default en. Call build() when both values are ready.

final NDefText label = new NDefTextCreator()
.text("Mein Portfolio")
.language("de-CH")
.build();
System.out.println(label.language()); // de-CH
Java imports
import com.rvi.application.creator.NDefTextCreator;
import com.rvi.domain.NDefText;

Use a language tag such as de-CH with a hyphen between language and region.

The builder stores the text and language and constructs NDefText, which handles Unicode and language tag validation. The language describes the text and does not translate it.

NDefText · NDefMessageCreator · NDefValueException

Method signatures in the Javadoc · All API types