wifi

Can you explain the Functionality of requestRouteToHost() in android?

人盡茶涼 提交于 2019-12-01 00:08:37
In my code I am using requestRouteToHost() method: Does this routing means changing the WIFI to 3G or vice versa?? My code is not working... public static boolean isHostAvailable(Context context, String urlString) throws UnknownHostException, MalformedURLException { boolean ret = false; int networkType = ConnectivityManager.TYPE_WIFI; ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); if(cm != null){ NetworkInfo nf = cm.getActiveNetworkInfo(); if(nf != null){ networkType = nf.getType(); } URL url = new URL(urlString); InetAddress iAddress =

how to calculate power consumption on an Android mobile that uses wifi?

↘锁芯ラ 提交于 2019-12-01 00:03:34
I have implemented a routing protocol on an Android 1.6 mobile that uses wireless (ad-hoc) network in order to exchange messages. Now I would like to evaluate it under an energy consumption point of view, the base would be to try to calculate the energy wasted to transmit a single packet, do anybody has any idea how to do that? Software/hardware solutions are welcome! I don't believe that any application will give you any form of meaningful result. You really need to be looking at a hardware solution, and it will likely need to be home-brew. The set-up I have used for power measurement on

Set WiFi proxy without rooting phone [closed]

为君一笑 提交于 2019-11-30 21:15:31
I'm connected with my personal Android phone on the WiFi network of my company. To access to the Internet, we have to specify the proxy address and port ; no user or password to set. How could I specify proxy address in my phone without rooting it? I don't find any option in the WiFi advanced settings. AFAIK, APN is used only for 3G network and not for WiFi. Is it right ? Update: An update Other The Air (OTA) had been performed on my phone several weeks ago. Now, with my HTC Desire HD with Android 2.3, I can set the WiFi proxy (before, it was running on Android 2.2). On Home screen, "Menu" Key

Can an Android device broadcast an SSID?

瘦欲@ 提交于 2019-11-30 20:47:45
问题 I want to look at data coming from a Nintendo 3DS on an Android device. The 3DS will automatically try and connect to any router with the SSID of "Nintendo_3DS_continuous_scan_000". I know it should be possible, since tethering apps do essentially the same thing. I've tried looking at Wifi Direct or Wifi P2P , but so far I haven't seen any option to set an SSID. Am I looking at the wrong library for this project? EDIT: I found a library here that handles the Access Points. I've successfully

Set or View “Advanced Wi-fi” Settings programatically

ε祈祈猫儿з 提交于 2019-11-30 20:22:53
I need a way to open the "Advanced wifi" settings programatically to let the user change some of the settings, or, preferably, to change these advanced wireless settings programatically. I can only access the wi-fi settings so far via startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS)) but not the advanced settings. Is there a way to open the "Advanced wifi" settings? There are two more settings that might work for you: From the API documentation: Settings.ACTION_WIRELESS_SETTINGS startActivity(new Intent(android.provider.Settings.ACTION_WIRELESS_SETTINGS)); Settings.ACTION_WIFI_IP

Am I using CNCopyCurrentNetworkInfo correctly?

时光怂恿深爱的人放手 提交于 2019-11-30 19:17:25
I'm having some issues with the data returned by CNCopyCurrentNetworkInfo and was wondering if I'm doing something wrong. I'm using the following code to display the BSSID of the currently connected Access Point: NSArray* interfaces = (NSArray*) CNCopySupportedInterfaces(); for (NSString* interface in interfaces) { CFDictionaryRef networkDetails = CNCopyCurrentNetworkInfo((CFStringRef) interface); if (networkDetails) { NSLog(@"all details: %@", (NSDictionary *)networkDetails); NSLog(@"BSSID: %@", (NSString *)CFDictionaryGetValue (networkDetails, kCNNetworkInfoKeyBSSID)); CFRelease

Can you explain the Functionality of requestRouteToHost() in android?

∥☆過路亽.° 提交于 2019-11-30 18:49:43
问题 In my code I am using requestRouteToHost() method: Does this routing means changing the WIFI to 3G or vice versa?? My code is not working... public static boolean isHostAvailable(Context context, String urlString) throws UnknownHostException, MalformedURLException { boolean ret = false; int networkType = ConnectivityManager.TYPE_WIFI; ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); if(cm != null){ NetworkInfo nf = cm.getActiveNetworkInfo(

Creating an NDEF WiFi record using application/vnd.wfa.wsc in Android

こ雲淡風輕ζ 提交于 2019-11-30 17:39:27
As of Android 5.0.0 you can long tap on a WiFi connection and write that connection to a tag ("Write to NFC tag"). You can find the source for that operation here: WriteWifiConfigToNfcDialog.java . The relevant line that takes a WiFi connection and creates an NDEF payload appears to be here: String wpsNfcConfigurationToken = mWifiManager.getWpsNfcConfigurationToken(mAccessPoint.networkId); mWifiManager is an instance of WifiManager , however getWpsNfcConfigurationToken is not part of the API. By tracking down this method, we can find its commit here: Add calls for NFC WSC token creation which

backing up prevent from the app in iCloud

烂漫一生 提交于 2019-11-30 16:01:28
The way apple storage guidelines is creating more problem for me because most of the data i am maintaining from the Documents directory (files,dataBase and some kind of app related stuff).Recently i uploaded a binary file to the app store it was rejected and apple provided me a report according to this point i am going to change my code as a below - (NSString *)applicationDocumentsDirectory { NSString *documentPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; NSURL *pathURL= [NSURL fileURLWithPath:documentPath]; [self

Android: Scanning Wifi Network + Selectable list

こ雲淡風輕ζ 提交于 2019-11-30 15:29:01
问题 I'm trying to creat an application that let you scan the available wifi networks, and then display them in a selectable list. To do that I tried with this code: package android.nacho.WifiScan; import java.util.List; import android.app.Activity; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.wifi.ScanResult; import android.net.wifi.WifiManager; import android.os.Bundle; import