... | @@ -518,18 +518,18 @@ Wi-Fi networks are available worldwide and may be usable (without internet acces |
... | @@ -518,18 +518,18 @@ Wi-Fi networks are available worldwide and may be usable (without internet acces |
|
|
|
|
|
Some Android devices can act as Wi-Fi access points.
|
|
Some Android devices can act as Wi-Fi access points.
|
|
The system UI allows the user to enable an access point and configure its network name and password.
|
|
The system UI allows the user to enable an access point and configure its network name and password.
|
|
Clients connected to the access point can access the internet via the device providing the access point.
|
|
Connected clients can access the internet via the access point.
|
|
Some devices require a SIM card to be inserted before this feature can be used.
|
|
Some devices require a SIM card to be inserted before this feature can be used.
|
|
|
|
|
|
On Android versions 5.1 and earlier (API level 22), applications can use reflection to access a hidden API for enabling an access point, including specifying the network name and password.
|
|
On Android versions 5.1 and earlier (API level 22), applications can use reflection to access a hidden API for enabling an access point, including specifying the network name and password.
|
|
|
|
|
|
Android versions 8 and later (API level 26) have an API for creating a "local-only hotspot", which is an access point that doesn't share the device's internet connection with connected clients.
|
|
Android versions 8 and later (API level 26) have an API for creating a "local-only hotspot", which is an access point that doesn't provide internet access to connected clients.
|
|
|
|
|
|
<https://developer.android.com/reference/android/net/wifi/WifiManager#startLocalOnlyHotspot(android.net.wifi.WifiManager.LocalOnlyHotspotCallback,%20android.os.Handler)>
|
|
<https://developer.android.com/reference/android/net/wifi/WifiManager#startLocalOnlyHotspot(android.net.wifi.WifiManager.LocalOnlyHotspotCallback,%20android.os.Handler)>
|
|
|
|
|
|
This is similar to a Wi-Fi Direct legacy mode access point, which is described in the Wi-Fi Direct section.
|
|
A local-only hotspot is similar to a Wi-Fi Direct legacy mode access point, which is described in the Wi-Fi Direct section.
|
|
|
|
|
|
With all of these methods, clients connected to the access point can typically connect to each other, and to the device providing the access point, via TCP and UDP.
|
|
With all of these methods of providing an access point, clients connected to the access point can typically connect to each other, and to the device providing the access point, via TCP and UDP.
|
|
The device providing the access point may not be able to connect to clients, however, because Android treats the access point interface differently from other network interfaces.
|
|
The device providing the access point may not be able to connect to clients, however, because Android treats the access point interface differently from other network interfaces.
|
|
|
|
|
|
We still need to test whether LAN multicast and the NSD API can be used (by clients and/or the device providing the access point) on networks where the access point is provided through each of these methods.
|
|
We still need to test whether LAN multicast and the NSD API can be used (by clients and/or the device providing the access point) on networks where the access point is provided through each of these methods.
|
... | @@ -593,21 +593,13 @@ There is no warning about lack of internet access and the device stays connected |
... | @@ -593,21 +593,13 @@ There is no warning about lack of internet access and the device stays connected |
|
|
|
|
|
The app can disconnect from the requested network and remove the saved configuration by calling `WifiManager#removeNetwork()`.
|
|
The app can disconnect from the requested network and remove the saved configuration by calling `WifiManager#removeNetwork()`.
|
|
|
|
|
|
|
|
TCP connection attempts from the client devices to the device providing the access point (Nokia 1.3) can take several seconds to connect.
|
|
|
|
|
|
##### 3. `WifiManager#connect()`
|
|
##### 3. `WifiManager#connect()`
|
|
|
|
|
|
This method is available on Android versions 9 and earlier (API level 28) and was tested on the LGE Nexus 5X, Moto G 4G and Honor 8A.
|
|
This method is available on Android versions 9 and earlier (API level 28) and was tested on the LGE Nexus 5X, Moto G 4G and Honor 8A.
|
|
|
|
|
|
As in the previous method, the app creates a `WifiConfiguration` with a high priority value and adds the configuration via `WifiManager#addNetwork()`. The app then uses reflection to call `WifiManager#connect()`. Like the previous method, this connects to the requested network immediately, even if the device is currently connected to a network with internet access and the requested network does not have internet access. The Honor 8A sometimes reconnects to the network with internet access instead of connecting to the requested network.
|
|
As in the previous method, the app creates a `WifiConfiguration` with a high priority value and adds the configuration via `WifiManager#addNetwork()`. The app then uses reflection to call `WifiManager#connect()`. This appears to behave identically to the previous method.
|
|
|
|
|
|
A few seconds after connecting to the requested network, the Honor 8A shows a dialog that warns about lack of internet access. Regardless of whether "Cancel" or "Connect" is chosen, the device stays connected to the requested network.
|
|
|
|
|
|
|
|
The requested network is added to the device's list of saved networks.
|
|
|
|
|
|
|
|
There is no warning about lack of internet access and the device stays connected to the network.
|
|
|
|
|
|
|
|
The app can disconnect from the requested network and remove the saved configuration by calling `WifiManager#removeNetwork()`.
|
|
|
|
|
|
|
|
TCP connection attempts from the client devices to the device providing the access point (Nokia 1.3) can take several seconds to connect, which is surprising on a LAN.
|
|
|
|
|
|
|
|
##### Summary
|
|
##### Summary
|
|
|
|
|
... | | ... | |