NDefUriCreator
com.rvi.application.creator.NDefUriCreator · Class · SocialCard 1.0.3
Collect a URI and build a validated link record.
When to use it
Section titled “When to use it”Call uri() with a full address, then build(). Use this builder when constructing several record types with a consistent fluent syntax.
Java example
Section titled “Java example”final NDefUri link = new NDefUriCreator() .uri("mailto:help@example.com") .build();
System.out.println(link.uri());Java imports
import com.rvi.application.creator.NDefUriCreator;import com.rvi.domain.NDefUri;Add the resulting record to NDefMessageCreator when you are ready to encode it.
How it works
Section titled “How it works”uri() stores the input. The builder calls the NDefUri constructor at build(), where the URI is parsed and normalised. You can catch NDefValueException at that point to return an input error to the user.