NDefWifiCreator
com.rvi.application.creator.NDefWifiCreator · Class · SocialCard 1.0.3
Build a Wi-Fi credential record for an open or WPA2-Personal network.
When to use it
Section titled “When to use it”For WPA2-Personal, supply the SSID and password to use the default authentication and encryption. For an open network, select both OPEN and NONE and leave the password unset.
Java example
Section titled “Java example”final NDefWifi guest = new NDefWifiCreator() .ssid("Guest") .authentication(WifiAuthentication.OPEN) .encryption(WifiEncryption.NONE) .build();
System.out.println(guest.ssid());Java imports
import com.rvi.application.creator.NDefWifiCreator;import com.rvi.domain.NDefWifi;import com.rvi.domain.WifiAuthentication;import com.rvi.domain.WifiEncryption;Use separate builders for separate networks to avoid carrying over the credentials of a previous build.
How it works
Section titled “How it works”The default settings are WPA2_PERSONAL with AES. The builder constructs NDefWifi when build() is called, and that record checks SSID size, settings and password together.
Related API
Section titled “Related API”NDefWifi · WifiAuthentication · WifiEncryption · NDefValueException