wifi

Enable/Disable Wifi on Android in Unity

浪子不回头ぞ 提交于 2019-11-28 00:36:43
I am trying to enable or disable Wifi from Unity on my Android device. I tried to do the different things I found on the forum without success. If I do: using(var unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) { string wifiServiceName = unityPlayer.Get<string>("WIFI_SERVICE"); using(var wifiManager = unityPlayer.Call<AndroidJavaObject>("getSystemService", wifiServiceName)) { wifiManager.Call("setWifiEnabled", false); } } I have an error saying that WIFI_SERVICE doesn't exist. If I do: using (AndroidJavaObject activity = new AndroidJavaClass("com.unity3d.player

How to handle WiFi to Mobile network switch programatically?

若如初见. 提交于 2019-11-27 22:44:11
问题 Right now, I am having application which works with WiFi, but while I am going to mobile providers network my application does not working. I have maintained one background service which checks for network, but im not getting how to handle network switch WiFi to Mobile and Mobile to WiFi? I am not getting how to handle WiFi to mobile network switch because already WiFi is enabled and I am not in WiFi coverage area; in this situation I want to get switched to mobile network automatically and

Open Wifi Settings by “prefs:root=WIFI” failed in iOS 10

情到浓时终转凉″ 提交于 2019-11-27 21:13:02
问题 I was using prefs:root=WIFI url scheme in my app with prefs entered in info.plist to open directly the iOS settings application in Wi-Fi settings and it was working great on iOS 9 but it does not work anymore on iOS 10. Does anyone know if this is just a regression in the first developer preview or the way to open Wi-Fi settings has changed in iOS 10 or it is not allowed anymore? 回答1: Just so it's explicit: Apple does not allow this. It's possible your app will make it through anyway, but

Android Lollipop defaults to Mobile Data when Wi-Fi has not Internet access?

微笑、不失礼 提交于 2019-11-27 21:12:48
问题 Android Lollipop seems to default to Mobile Data when the Wi-Fi you are connected to has no Internet access. Does anybody know if this is officially documented somewhere? We have an application that needs to connect to machines via Wi-Fi that do not have Internet. Our customers are now reporting that the Wi-Fi connection does not work anymore, because the phone automatically switches to LTE . My understanding would be that the phone still keeps the Wi-Fi connection but uses LTE in addition to

Force Android to use 3G when on local area wifi without net access

为君一笑 提交于 2019-11-27 20:37:23
问题 I have a wifi LAN setup which does not have internet access. Just various other local wifi devices connected to it. The DHCP is configured to not return a gateway or dns server. Only an IP and netmask. When I connect my android to this wifi AP it connects fine, but all internet connectivity on the phone stops working. I would expect that since the wifi has no gateway setting that android should realize the internet can't go through that connection and should instead be routed through the 3G

Make Android simultaneously use WiFi to talk to a device and mobile data to talk to a server?

末鹿安然 提交于 2019-11-27 19:51:40
I'm developing an Android application which connects to an OBD2 device by Wifi and app can read Speed, RPM, Engine coolant temperature details etc. So wifi is used only for connecting with the OBD2 device(it doesn't have facility to connect with internet, only for communication with local clients). I also need an internet connection for web services. But after connecting my wifi I am not able to connect internet via my mobile data network in android. The similar application is also developed for iOS. In iOS, I can use device over Wifi (Static Wifi setting) and Internet connection from my

Create Wifi Hotspot Configuration in android

穿精又带淫゛_ 提交于 2019-11-27 19:11:54
I am using android 4.1.1 ... I am making an application that allows the user to make his own network using Wifi Hotspot and then the clients can connect to it and share data. I have successfully created the Wifi hotspot in android but I cannot configure it for the purpose. Is there any way to configure Wifi Hotspot on android through coding ?? This answer maybe outdated! if(wifiManager.isWifiEnabled()) { wifiManager.setWifiEnabled(false); } WifiConfiguration netConfig = new WifiConfiguration(); netConfig.SSID = "MyAP"; netConfig.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);

How to get the connection strength of Wifi access points?

我与影子孤独终老i 提交于 2019-11-27 18:52:01
I am building an application reading the signal strength of each available Wifi access point. I've written code like: wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); // Get WiFi status WifiInfo info = wifi.getConnectionInfo(); textStatus.append("\n\nWiFi Status: " + info.toString()); // List available networks List<WifiConfiguration> configs = wifi.getConfiguredNetworks(); However, I have two problems: In debugging, configs only contains one connection. However, I can see that there are several APs available in the system's wifi setting. I.e. configs is an incomplete list. I don't

How can I create a small Mac app that receives data over the WiFi network from an iOS app?

本小妞迷上赌 提交于 2019-11-27 18:26:02
What I need is to have a simple screen in this Mac app that just prints a string as the iPhone is transmitting strings through the WiFi network. This string is simply a string value from a slider being adjusted up and down by the user on the iPhone. The data will be sent to the Mac app and then the Mac app will receive this signal from the WiFi network and simply print the values. This is a constant connection. I'm not trying to sync once. I'm trying to listen to the iPhone device from the Mac to see if the iPhone is sending any more strings as the user slides the UISlider up and down from the

How to convert Wifi signal strength from Quality (percent) to RSSI (dBm)?

♀尐吖头ヾ 提交于 2019-11-27 17:44:22
How should I convert Wifi signal strength from a Quality in percentage, usually 0% to 100% into an RSSI value, usually a negative dBm number (i.e. -96db )? Wifi Signal Strength Percentage to RSSI dBm Microsoft defines Wifi signal quality in their WLAN_ASSOCIATION_ATTRIBUTES structure as follows: wlanSignalQuality : A percentage value that represents the signal quality of the network. WLAN_SIGNAL_QUALITY is of type ULONG. This member contains a value between 0 and 100. A value of 0 implies an actual RSSI signal strength of -100 dbm. A value of 100 implies an actual RSSI signal strength of -50