Can I search and connect to Wi-Fi via Android/iPhone app?

Asked 2 years ago, Updated 2 years ago, 79 views

I'm thinking of an app that automatically connects to a specific Wi-Fi spot when a specific app starts.

Is it possible to search for wireless LAN access points and connect to any Wi-Fi network found on Android or iPhone application programs?

android iphone

2022-09-30 15:31

3 Answers

I am writing because only ios is popular and there was no way to implement Android.

The implementation of a blog called Memo is very helpful because I struggled around WiFi connections.Recommended.
If the SSID name has been determined, the above information, whether open or stealth, should be sufficient.

Supplement to the name Snakefoot.

How to Find a Wireless LAN Access Point

Under Android Wi-Fi Tutorial,
mainWifiObj.getScanResults is searching for hotspots.However, it is important to note that in this case, hiddenSSID cannot be searched.
Also, as a general premise, if WiFi is not turned on in the setting of the terminal, the SSID search results and the scan results should all be null returned by any means.(If you're lying, please correct me.)
It's easy to implement how to turn on the WiFi setting on the device, but honestly, I think it's a difficult task to notify the general user of how to set up a cushion to turn on WiFi.

How to Detect Connectivity to a Wi-Fi Network

How to detect when WIFI Connection has been established in Android? I implemented the second largest poll.

How do I detect that the Wi-Fi on my Android device is turned on?

In connection with the story , it may take some time for the WiFi function to be turned on, depending on the device listed above.
You can set android.net.wifi.WIFI_STATE_CHANGED to broadcast and wait for WifiManager.WIFI_STATE_ENABLED to be caught as int.If you google the words listed above, the implementation will come out for now.
...When I implemented it as a support app for development in-house, Huawei's device notified me of the intents for a long time, so I gave up listening to communication by trying to mechanically retry the connection about 5 times in the middle.

I hope this will be helpful.


2022-09-30 15:31

It may be different from what I want to do, but
For iOS, if you know (and don't change) the SSID of the Wi-Fi you want to connect to,
Configuration profiles can be provided to simplify connectivity.
However, it is necessary to have users using the app install it.

From an image point of view, it looks like the product at the link below.
http://121ware.com/product/atermstation/special/rakuraku_qr_ios/page2.html

This may be helpful for configuring profiles.
http://www.atmarkit.co.jp/ait/articles/1210/17/news082.html
https://developer.apple.com/jp/devcenter/ios/library/documentation/iPhoneConfigurationProfileRef.pdf (per page 62)


2022-09-30 15:31

As for ios only, I don't think I can.
If it becomes possible, it will also be a big security issue.

Regarding English, I have a similar question here.
https://stackoverflow.com/questions/12619257/iphone-how-to-auto-connect-to-a-known-wifi-ssid


2022-09-30 15:31

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.