wifi

Android how to know Internet total data usage per day through wifi and mobile

断了今生、忘了曾经 提交于 2019-12-07 05:49:35
问题 How to know internet total data usage per day? For example, at the end of the day I used 800mb then it should return like "internet usage of 800mb on 20th May 2015". So how can I detect total data usage ? After much googling I could only find data usage in sending and receiving bytes but not in total usage. And also want to split the usage into wifi and mobile data. 回答1: Take a look at the TrafficStats class. For this, you'll want to look specifically at getTotalRxBytes(), getTotalTxBytes(),

How to get Wi-Fi router IP address on iOS?

情到浓时终转凉″ 提交于 2019-12-07 04:46:52
问题 Is there any way to get Wi-Fi router IP address on iOS from my application? With help of getifaddrs(struct ifaddrs **) method I can get interface address, subnet mask, broadcast address, but cannot get router address. I have found a lot of solutions for Mac OS, but not for iOS. Any solutions for iOS? 来源: https://stackoverflow.com/questions/24887904/how-to-get-wi-fi-router-ip-address-on-ios

Can Phonegap query the wifi system and return network names?

ε祈祈猫儿з 提交于 2019-12-07 04:23:15
问题 I checked the Phonegap API but what I would like to achieve, getting a list of available wifi networks, seems not supported. Anyone knows if it's possible at all in the current state? 回答1: You cannot get a list of available wifi networks at the moment. PhoneGap will support reading the currently connected network SSID via the system information api (http://www.w3.org/TR/system-info-api/#network). If you wanted to list all the wifi networks today, you would have to write a PhoneGap plugin --

Network access when the Android phone is asleep

筅森魡賤 提交于 2019-12-07 04:20:38
问题 I'm using a combination of alarm (set with AlarmManager ) and background service to periodically synchronize data in my application. The only problem I have is that when sleep policy terminates Wi-Fi connection the synchronization no longer works. Is there a way to "wake up" the Wi-Fi connection that has been put to sleep? GMail somehow manages to do that because it notifies me about new e-mail even if the phone entered sleep mode. 回答1: [update]You can use a WifiLock to keep WiFi active,

how to check the real Internet connected in android?

馋奶兔 提交于 2019-12-07 03:13:02
问题 I make a program, and I have to use wifi to connect Internet. I find some information to check whether the wifi is connected or not. But in some situation, you can connect the wifi AP but you still can't use Internet like the wifi needed account and password to certificate in https, or the wifi AP is not able to Internet. So, how can I check the real Internet connected? 回答1: Just do a "Ping" to www.google.com chances that they are down are very low. P.S. it's what we do in our app.. public

connecting an iOS app to wifly module

故事扮演 提交于 2019-12-07 02:48:13
问题 I have a Wifly module that is in AdHoc mode (i.e. it creates its own local wifi network) and I would like to program into my iOS app the ability to connect to the Wifly and send data back and forth. When communicating with the Wifly from a computer, you have to send command through a terminal emulator. Does anyone know how to do this from an iOS app? Thanks 回答1: You (or your user) first need to connect manually to the ad-hoc Wifly network in the wifi settings. Then, to communicate from your

Bluetooth protocol over wifi?

陌路散爱 提交于 2019-12-07 02:21:49
问题 I'm looking to implement the Bluetooth protocol over a physical Wi-Fi based transport, if that makes sense. Basically my phone has Bluetooth, and my laptop has a Wi-Fi card (802.11a/b/g). I know that Wi-Fi operates over the range 2.412 GHz - 2.472 GHz, and that Bluetooth operates over the range 2.402 GHz - 2.480 GHz. I couldn't help but notice the overlap here. So my questions are: What sort of low-level APIs would I need (preferably in C, on Windows) in order to send a signal out at certain

How to connect to known WiFI using Intent in Android?

核能气质少年 提交于 2019-12-07 02:02:17
问题 I've got something like this: wifiNetworks = (ArrayList<ScanResult>) mWifiManager.getScanResults(); Now I can simply get wifi SSID: wifiNetworks.get(0).SSID I don't know if network is WEP, WPA, does it have password or not, so I just want to create an Intent, put there SSID or ScanResult and send it to Settings or wherever in order to let user to enter the password and connect to that network. Is it possible? And if not, what is the easiest way to get information about network type and

Is it possible to force network traffic through Wifi or the TMobile network?

纵饮孤独 提交于 2019-12-06 22:31:42
问题 I'm wondering if, with the G1, it's possible to force the network traffic to pass through the Wifi or through the Cell GSM network. I need to force an application to connect through the tower network to get some login information. Is this possible? Anyone have any ideas as to how this would be possible? I'm trying to accomplish this inside an app with the Android SDK (Sorry I wasn't more clear about that originally) 回答1: It turns out to be possible using the WifiManager object to disable and

How can I turn ON radio of a Wifi adapter that is actually OFF?

。_饼干妹妹 提交于 2019-12-06 16:04:01
I'm using Managed Wifi to get the radio state of my Wifi adapter. How can I turn the radio ON in case it is actually off ? Something like this : WlanClient wlanClient = new WlanClient() var targetInterface = wlanClient.Interfaces.FirstOrDefault() if (targetInterface != null) { bool radioIsOff = targetInterface .RadioState.PhyRadioState[0].dot11SoftwareRadioState == Wlan.Dot11RadioState.Off; if (radioIsOff) { // TODO } } I just added this to the WlanInterface class of the Managed Wifi API : IntPtr radioStatePtr = new IntPtr(0L); try { Wlan.WlanPhyRadioState radioState = new Wlan