wifi

Android Wifi broadcast receiver not working as expected

我只是一个虾纸丫 提交于 2019-12-20 07:31:41
问题 I have to get the WiFi ssid whenever phone connects to new WiFi network. I registered the following receiver `registerReceiver(this.mybroadcast, new IntentFilter(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION));` This part of code works perfectly. But in onReceive method, NetworkInfo info = intent.getParcelableExtra(WifiManager.EXTRA_WIFI_INFO)); always returns null. I tried EXTRA_NETWORK_INFO as well, but it also returns Null. I can't use this.registerReceiver(this.mybroadcast, new

startscan() has result after 10 min when phone get into idle state

纵然是瞬间 提交于 2019-12-20 04:35:17
问题 I am trying to scan wifi networks every 2 minutes. I am using service for that. When the phone is "active" or "in use" after startscan() called I get SCAN_RESULTS_AVAILABLE_ACTION in 6 sec. So i can scan for wifis periodically. But after the phone has not been touched by anyone for a certain time (10 min) startscan() stops "working" and only after 10 min getting result. Anybody experienced this? 回答1: According to this I have found the solution - this is because the Wifi sleep policy. You can

How to fetch the list of near by wifi networks and able to connect to them from our App in ios (Using private API for enterprise App)?

北慕城南 提交于 2019-12-20 04:33:06
问题 I want to fetch the list of near by wifi networks and able to connect to them from our App in ios, and my Application is Enterprise App so even private api's is also fine. Stuck this issue since 2 weeks, please provide me some references.. 回答1: What you require will only work on JailBroken devices, the blog(blog.guvenergokce.com/iphone-wireless-scanner-ios5/170) which @Ckouta referred also has one comment from the Blog Admin, I’m assuming that your device is already jailbroken (otherwise not

Android: Broadcastreceiver with Achartengine ,don't display updates

风流意气都作罢 提交于 2019-12-20 04:23:45
问题 I'm trying to display information got from wifi scan with broadcast receiver ,into a bar chart using achartengine. Well i want to have a real time chart ,every time i receive data from onReceive() method ,i update the chart. To achaeive that ,i create the chart objects in the onReceive() method .But i just get a chart with the first result ,there is no update ,although i can see the changes on the wifi scan. I would like to know what is the problem. This is the code that i'm using: public

Can't set “WifiConfiguration” when enabling wifi-hotspot using “setWifiApEnabled”

只愿长相守 提交于 2019-12-20 02:59:08
问题 I'm trying to set my Android device to be an Access-Point using the code I've seen here before: WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); WifiConfiguration netConfig = new WifiConfiguration(); netConfig.SSID = "MyAccessPoint"; Method method = wifi.getClass().getMethod("setWifiApEnabled", WifiConfiguration.class, boolean.class); method.invoke(wifi, netConfig, true); now, I managed to turning it on but without the SSID which I set in WifiConfiguration. This is

iOS: how to query WiFi state

◇◆丶佛笑我妖孽 提交于 2019-12-20 02:48:08
问题 Is it possible to query WiFi state (enabled/disabled) on iOS programmatically? The query should return true when WiFi is enabled and device is not connected to any network. EDIT: I am aware of the functionality provided by Reachability class and as far as I understand it does not recognize enabled but not connected state of WIFI. I.e. the following code will return NetworkStatus NotReachable , which is not what I need. Reachability* r = [Reachability reachabilityForLocalWiFi]; NetworkStatus

how to find wifi signal direction of another device in android?

柔情痞子 提交于 2019-12-19 18:24:40
问题 I am using my android phone as Access Point. Now I want to find the distance and direction of the wifi devices connected with my phone. Please help me through suitable example and code. Thanks in advance. 回答1: I downloaded Wifi Radar that you mentioned and tried it. There's an important step there - it asks you to rotate on the spot for a bit while holding the device to your body. So my guess is that it uses the internal compass to figure out which direction you're pointing to, and then

Blackberry wifi http connection

痞子三分冷 提交于 2019-12-19 12:49:10
问题 I am building a blackberry application takes input from user then send input to a server and displays the xml returned from server. The problem is, while application works fine on simulator it doesn't show results all the time on real device. Sometimes it is working but usually it's not. I am using wifi connection on device. The code is: Connector.open(url + ";interface=wifi"); I am not using wifi on simulator. I just delete the 'interface=wifi' part and it runs using mds. When input taken, a

Android, wifi active scans

冷暖自知 提交于 2019-12-19 10:45:42
问题 I need a frequent wifi scan on my android application (I'm trying to build a local indoor positioning system based on wifi RSSI values). IF I call wifi.startScan() I have onReceive() called back once every 6 seconds (I suppose by default it's scanning passively): how do I get more frequent callbacks? Should I ask for "active" scans? How is it done? Are there any drawbacks? 回答1: I don't think you can. It is a device and/or OS version dependend setting. On the Nexus One for example it takes

Getting wifi Signal strength

佐手、 提交于 2019-12-19 10:27:11
问题 Is there a way to get wifi signal strength in C#? Currently I'm getting the same through Process proc = new Process(); proc.StartInfo.CreateNoWindow = true; proc.StartInfo.FileName = "netsh"; proc.StartInfo.Arguments = "wlan show interfaces"; proc.StartInfo.RedirectStandardOutput = true; proc.StartInfo.UseShellExecute = false; proc.Start(); and then I get the wifi signal strength by reading the output. Is there a better way? Preferably using API's 回答1: Why don't you use a WMI query to get it