NDefContactCreator
com.rvi.application.creator.NDefContactCreator · Class · SocialCard 1.0.3
Build a vCard record by setting only the contact fields you have.
When to use it
Section titled “When to use it”Use firstName() or lastName() to identify the contact, then add optional details with email(), phone() and website(). Call build() after setting the fields.
Java example
Section titled “Java example”final NDefContact contact = new NDefContactCreator() .firstName("Alex") .lastName("Example") .email("alex@example.com") .build();
System.out.println(contact.email());Java imports
import com.rvi.application.creator.NDefContactCreator;import com.rvi.domain.NDefContact;For a smaller record, leave fields unset if they are unnecessary for the recipient.
How it works
Section titled “How it works”build() calls the NDefContact constructor, which trims strings, checks basic email and phone syntax, and validates an HTTP or HTTPS website. This is input validation. It does not confirm that an address or number exists.