wifi

Get current position with GPS AND WIFI

懵懂的女人 提交于 2019-12-07 17:58:30
问题 I'm currently using GPS only to get current location of the user to return certain results. As in Belgium, if you're inside, most of the time you can't get GPS-connection. So I want to get the current location with the wifi-connection. I've found this example: get the current location (gps/wifi) But I'm not sure which lines tell the device which connection to choose. I'm guessing it's this one: String provider = myLocationManager.getBestProvider(criteria,true); That I've to add to my code.

Switching from WiFi connection to 3g causes connection to hang?

落花浮王杯 提交于 2019-12-07 17:32:15
问题 I have an application which connects to a web service. I can connect to the web service any number of times without any problem using WIFI or 3G provided that I stay loyal to my connection type during the life cycle of my application. That is if I don't switch from WIFI to 3G. If I switches from WIFI to 3G, I can't get a response anymore. My connection just keeps on waiting for response. I tried 4 scenarios below. I'm only having problem with the 3rd scenario. What could be the problem? 1st

how can I send raw packets over wifi without a network?

∥☆過路亽.° 提交于 2019-12-07 17:04:18
问题 I am trying to send some data between 2 raspberry pi's over wifi without them being connected to a network. I want it to work similar to the way beacons and probe requests work, where a broadcast can be sent out the wireless interface. the data I want to send will be the hostname of the device and the time the packet was sent. I've been trying to figure this out for the last few days but I cannot get anything to work without them being on the same network. Is anybody able to point me in the

How can I list the devices connected to my WiFi network using VB6 or BAT/CMD?

坚强是说给别人听的谎言 提交于 2019-12-07 16:29:22
问题 I am making a program to list all the devices who are connected to my Wi-Fi network so that I can see if anyone else is connected. I have found a code for CMD - net view but it lists only the computers connected to my Wi-Fi but not the mobile devices. Is there any other command to list mobile devices connected to my Wi-Fi using CMD. 回答1: You need an external tool called : Wireless Network Watcher Description : Wireless Network Watcher is a small utility that scans your wireless network and

C# Dns.GetHostEntry doesn't return names of mobile devices connected to WiFi

让人想犯罪 __ 提交于 2019-12-07 16:25:17
问题 I have a windows form application in C# and I'm trying to get the host name of all the clients that I have in a list. Given below is a code example by ra00l from this link: GetHostEntry is very slow (I have a similar code made but this one is cleaner) private delegate IPHostEntry GetHostEntryHandler(string ip); public string GetReverseDNS(string ip, int timeout) { try { GetHostEntryHandler callback = new GetHostEntryHandler(Dns.GetHostEntry); IAsyncResult result = callback.BeginInvoke(ip,null

How to set system wide proxy in ICS

无人久伴 提交于 2019-12-07 15:46:35
问题 For Android 3.x and before, you can bring up a hidden UI called com.android.settings.ProxySelector. It is set in Settings.Secure.HTTP_PROXY and used by Mobile network (WiFi network does not always work). However for ICS, I can still bring up this hidden UI, but it does not seem to set proxy anymore. When I click "Done", then I check Settings.Secure.HTTP_PROXY or system property http.proxyHost, neither is set. So is there a way in ICS that would allow me to set global proxy much like what I

Can I use WiFi to transfer data/messages between two android phones, not connected to a router?

蹲街弑〆低调 提交于 2019-12-07 08:57:10
问题 I'm aware that if two Android phones are connected to a same wifi network, they can implement socket programming to transfer data between them But I actually want to know if you can use wifi as a transfer medium between two Android phones, just like you Bluetooth? 回答1: With Android 2.2+ it is possible to create a WiFi hot-spot on one device so another device can connect. Internet connection on either device is not required. 回答2: What you are looking for is ad-hoc wireless networking, which is

Wifi Broadcastreceiver onreceive

我怕爱的太早我们不能终老 提交于 2019-12-07 08:30:28
I have problems with the wifi broadcast receiver. It doesn't receive anything, onReceive is never called. Here's my code: public final class WifiChangeReceiver extends BroadcastReceiver { boolean portableHotspot = true; @Override public void onReceive(final Context context, Intent intent) { boolean alreadyPresent = false; String action = intent.getAction(); if(action.equals(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)) { WifiManager w = (WifiManager) context .getSystemService(Context.WIFI_SERVICE); List<ScanResult> l = w.getScanResults(); myApp myApp = (myApp)context.getApplicationContext();

Why does the native SIP stack included in Android 2.3 does not work over 3g?

守給你的承諾、 提交于 2019-12-07 07:20:53
问题 I was wondering why does the native SIP stack included in the Android framework(since 2.3) does not work over 3g? Could it have something to do with any laws or restrictions google may have with his partners? And furthermore, does anybody know if there is any plans to remove that restriction ? Thx 回答1: In GingerBread, SipManager is set to work only on wifi. `<bool name="config_sip_wifi_only">true</bool>` But from 4.0 onwards, this config has been changed to false So Ideally native sip stack

Wi-Fi scanning without broadcast receiver?

十年热恋 提交于 2019-12-07 07:14:55
问题 I have created wi-fi scanner. It continually scans for available wi-fi networks. But my question is why would exactly broadcast receiver is needed if i can actually run scanning (invoke startScan() with timer every x seconds) and receive the same results without creating broadcast receiver? This is broadcast receiver code in onCreate() method: i = new IntentFilter(); i.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION); receiver = new BroadcastReceiver(){ public void onReceive(Context c,