Barcode.WiFi
Stay organized with collections
Save and categorize content based on your preferences.
A wifi network parameters from a 'WIFI:' or similar QRCode type.
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Constants
public static final int
TYPE_OPEN
public static final int
TYPE_WEP
public static final int
TYPE_WPA
Public Methods
public int getEncryptionType ()
public String getPassword ()
Gets the password of the WIFI.
Returns null
if not available.
public String getSsid ()
Gets the ssid of the WIFI.
Returns null
if not available.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eBarcode.WiFi\u003c/code\u003e stores Wi-Fi network parameters extracted from QR codes with formats like "WIFI:".\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to access the Wi-Fi network's SSID, password, and encryption type (Open, WEP, or WPA).\u003c/p\u003e\n"],["\u003cp\u003eThe encryption type is represented by constants: \u003ccode\u003eTYPE_OPEN\u003c/code\u003e, \u003ccode\u003eTYPE_WEP\u003c/code\u003e, and \u003ccode\u003eTYPE_WPA\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetPassword()\u003c/code\u003e and \u003ccode\u003egetSsid()\u003c/code\u003e methods may return \u003ccode\u003enull\u003c/code\u003e if the corresponding information is not available in the QR code.\u003c/p\u003e\n"]]],["The `Barcode.WiFi` class extracts WiFi network parameters from a 'WIFI:' type QRCode. It defines constants for encryption types: `TYPE_OPEN` (1), `TYPE_WEP` (3), and `TYPE_WPA` (2). Key actions include retrieving the WiFi's encryption type via `getEncryptionType()`, password via `getPassword()`, and SSID via `getSsid()`. `getPassword()` and `getSsid()` will return `null` if they are not available. The `Barcode.WiFi.EncryptionType` nested interface defines wifi encryption type constants.\n"],null,["# Barcode.WiFi\n\npublic static class **Barcode.WiFi** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nA wifi network parameters from a 'WIFI:' or similar QRCode type. \n\n### Nested Class Summary\n\n|------------|---|---|---------------------------------|\n| @interface | [Barcode.WiFi.EncryptionType](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.WiFi.EncryptionType) || Wifi encryption type constants. |\n\n### Constant Summary\n\n|-----|-----------------------------------------------------------------------------------------------|-----------------------|\n| int | [TYPE_OPEN](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.WiFi#TYPE_OPEN) | Not encrypted. |\n| int | [TYPE_WEP](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.WiFi#TYPE_WEP) | WEP level encryption. |\n| int | [TYPE_WPA](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.WiFi#TYPE_WPA) | WPA level encryption. |\n\n### Public Method Summary\n\n|-------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| int | [getEncryptionType](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.WiFi#getEncryptionType())() Gets the encryption type of the WIFI. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getPassword](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.WiFi#getPassword())() Gets the password of the WIFI. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getSsid](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.WiFi#getSsid())() Gets the ssid of the WIFI. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nConstants\n---------\n\n#### public static final int\n**TYPE_OPEN**\n\nNot encrypted. \nConstant Value: 1 \n\n#### public static final int\n**TYPE_WEP**\n\nWEP level encryption. \nConstant Value: 3 \n\n#### public static final int\n**TYPE_WPA**\n\nWPA level encryption. \nConstant Value: 2\n\nPublic Methods\n--------------\n\n#### public int **getEncryptionType** ()\n\nGets the encryption type of the WIFI.\n\nSee all [Barcode.WiFi.EncryptionType](/android/reference/com/google/mlkit/vision/barcode/common/Barcode.WiFi.EncryptionType). \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getPassword** ()\n\nGets the password of the WIFI.\n\nReturns `null` if not available. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getSsid** ()\n\nGets the ssid of the WIFI.\n\nReturns `null` if not available."]]