Sample Header Ad - 728x90

What is a local-only hotspot

1 vote
1 answer
694 views
I was reading up on [local-only hotspots](https://source.android.com/docs/core/connect/wifi-softap) and was confused by some of the language. Am I right in my understanding that a local-only hotspot will be visible to and accessible by other phones in the physical vicinity but that there just won't be any internet provided by the network? That's originally what I thought until I read the documentation for the [WifiManager.startLocalOnlyHotspot](https://docs.kony.com/NativeAPIs/Android/android.net.wifi-Android-10.0/index.html#!/api/android.net.wifi.WifiManager) method: > Request a local only hotspot that an application can use to communicate between co-located devices connected to the created WiFi hotspot. The network created by this method will not have Internet access. *Each application can make a single request for the hotspot, but multiple applications could be requesting the hotspot at the same time.* When multiple applications have successfully registered concurrently, they will be sharing the underlying hotspot. (emphasis added) That suggests to me that the hotspot is not something that a phone would connect to like any other Wi-Fi network but that an application has to request access to somehow. Using Android Studio, I emulated two phones and ran a simple app on one of them that uses the WifiManager API to start the local hotspot. Running ifconfig in an adb shell, I see that the phone that created the hotspot gets an IPv4 address assigned to its wlan0 interface after the hotspot is started. I'm also able to get the app to report the hotspot's SSID ("AndroidShare_5479"). However, on the other phone, no additional entry shows up in the list of available Wi-Fi networks. Of course, there's always the possibility that I'm using the API incorrectly. However, that's a question better suited for StackOverflow. My question for this community is, "What is the nature/function of a local-only hotspot?"
Asked by Daniel Walker (260 rep)
Dec 3, 2023, 05:09 AM
Last activity: Oct 27, 2024, 03:35 PM