Skip to content

NDefWifi

com.rvi.domain.NDefWifi · Record · SocialCard 1.0.3

An open or WPA2-Personal network stored as a Wi-Fi credential record.

Use OPEN with NONE and an empty or null password, or WPA2_PERSONAL with AES and an 8–63 character printable ASCII passphrase or a 64-digit hex key. The SSID must occupy 1–32 UTF-8 bytes.

final NDefWifi guest = new NDefWifi(
"Guest", WifiAuthentication.OPEN, WifiEncryption.NONE, null);
final NDefMessage message = new NDefMessageCreator().add(guest).build();
System.out.println(new NDefDecoder().decode(message));
Java imports
import com.rvi.application.NDefDecoder;
import com.rvi.application.creator.NDefMessageCreator;
import com.rvi.domain.NDefMessage;
import com.rvi.domain.NDefWifi;
import com.rvi.domain.WifiAuthentication;
import com.rvi.domain.WifiEncryption;

Open guest networks avoid embedding a reusable passphrase in a publicly readable tag.

The value encodes into one Wi-Fi Simple Configuration credential. toString() redacts the password, but password() and the tag payload still carry it. Use a network intended for sharing and check whether the target device handles these records.

WifiAuthentication · WifiEncryption · NDefWifiCreator · NDefDecoder

Method signatures in the Javadoc · All API types