In android broadcasts, what's the difference between
<action android:name="android.net.wifi.STATE_CHANGE"/>
and
<action android:name="android.net.wifi.supplicant.CONNECTION_CHANGE" />
STATE_CHANGE : Broadcast intent action indicating that the state of Wi-Fi connectivity has changed. An extra provides the new state in the form of a NetworkInfo object.
This is lookup key for an int that indicates whether Wi-Fi is enabled, disabled, enabling, disabling, or unknown.
CONNECTION_CHANGE : Broadcast intent action indicating that a connection to the supplicant has been established (and it is now possible to perform Wi-Fi operations) or the connection to the supplicant has been lost. One extra provides the connection state as a boolean, where true means CONNECTED.
This is a lookup key for a boolean that indicates whether a connection to the supplicant daemon has been gained or lost. {@code true} means a connection now exists.
P.S: SUPPLICANT_CONNECTION_CHANGE_ACTION is deprecated from API level P
<action android:name="android.net.wifi.STATE_CHANGE"/>
Broadcast intent action indicating that the state of Wi-Fi connectivity has changed.
<action android:name="android.net.wifi.supplicant.CONNECTION_CHANGE" />
Broadcast intent action indicating that a connection to the supplicant has been established (and it is now possible to perform Wi-Fi operations) or the connection to the supplicant has been lost.
Note:
This constant was deprecated in API level P. This is no longer supported.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With