android-wifi

Android getWifiState to String

I am attempting to get the string representation of an Android device's current WiFi state. I am using the getWifiState() method of the WiFiManager and am getting an integer returned depending on the current state. This makes total sense as getWifiState() is supposed to return an integer. The method's documentation indicates that the pos...

Android Scan for Wifi networks

Hello, I'm trying to scan for wireless networks and found this helpful source on the net. Unfortunately it's not working and I have no idea why. My problem is that I can't wait 10 minutes for the result - I need them within a few seconds and thought about setting the boolean variable waiting on false as soon as I get a result.... well, i...

Is it possible to write a wifi cracking util for Android phones? Monitor mode vs Multicast?

Considering writing a wifi cracking (wep, wpa) auditing tool for the android platform, but I am wondering if it is possible to do without a rooted phone. I had thought it would be impossible to run on an unrooted phone due to the phones wifi chip ignoring packets not addressed to the phone. That is, without the ability to set the wifi c...

How to keep my wifi always turn on?

Hi, While disconnectiong to the selected wifi AP, my WiFi is turned off.I want to keep my WiFi always turn on while disconnecting to the the selected AccessPoint and in the meantime WiFi is n't trying to connect to other AP also.Iam using Android 1.5.Is there any solution for this? Regards, Rajendar ...

starting android wifi service

Right now I'm trying to restart android wifi service after stopping it. I stop the service with the following code: WifiManager wifiManager = ...; wifiManager.setWifiEnabled(false); This disables wifi when there's no lock on the wifi connection. But how do I restart the wifi service? My first approach was the following: wifiManager.s...

How can i determine best wifi from configured networks programmatically android?

Hi, For getting best signal strength for acesspoints. WifiManager.compareSignalLevel(bestSignal.level, result.level) < 0) method is there.But i need to check the configured networks for better signal strength.To use same above method to calculate, we need RSSI.But in Configuration class i haven't observered any field for RSSI.Is ther...

Android SDK WifiManager methods won't work?

For some reasons, this ain't working: wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); if(wifi.isWifiEnabled()) { tvStatus.setText("You WiFi is enabled"); } else { tvStatus.setText("You WiFi is disabled"); } Why aint this working, am i missing something? And it compiles and ever...

Android max ping size less than 64K

Hi, doing some tests with my ADP1 (version 1.6) I noticed that the maximum ping that I can send when it's connected with wifi (ad.hoc or with a router) is of 57740 bytes, shouldn't be 64K? I think it's related with the receiving buffer, do somebody know how to modify it or how to get information about it? ...

Unable to configure the wifi open network programmatically android?

Hi, I have written code for adding open network to wifi configured list.It adds the open network to configured lists and displays the same SSID's in Wifi Settings.but it adds the same network with same name extra but it doesn't shows any open network When i press on the second on alert shows with Security WEP the following text i observ...

how to handle wifi statement "connection unsuccessfull,not in range try again" android programmatically?

Hi, I need help in handling the "unsuccessfull......" statement programmatically.Is there any shared preferences for handling the text.If i get this text through programme then i can handle this problem.Actually one simple idea is there for handling this one,"disable and enable the wifi by manually".Whenever i got unsuccessfull statemen...

Can an android phone pause wifi scan requests?

Hello people! I wrote an android application to request a scan for available wifi signals around, using the WifiManager, then dump the results to a file. The program works fine, but this weird bug occurs. Initially I was requesting a scan every 30 seconds, and everything worked fine. I then tried to request a scan every two seconds, I ...

How to get name of wifi-network out of android using android API?

I thought that I should use NetworkInterface::getDisplayName. I got some name, but this name is different that this name which I can see, when I choosing to which network I want to connect. Please help.. [EDIT] acording to Loxley answer: WifiManager wifiMgr = (WifiManager) getActivity().getSystemService(Context.WIFI_SERVICE); WifiInf...

I'd like to send http request through 3G network when wifi is connected in android phone.

Dear all Android phone is attached both 3G and wifi network. I'd like to send http request through 3G network when wifi is connected in android phone. Could you tell me how to do it? Thank you for reading. ...

How to detect if user has 3G/Wifi on before making URL connection?

I don't want my app to crash if the user doesn't have wifi or 3g connectivity. How can I catch this at runtime in my app? ...

how to configure Android 2.2 phone as a Wi-Fi access point

How to configure Android 2.2 phone as a Wi-Fi access point?Any reference code? ...

Settings Action constant for Tethering settings page in Android 2.2 (Froyo)

Hello, I am able to open Wifi settings screen using startActivity(new Intent(Settings.ACTION_WIRELESS_SETTINGS)); I want to open the tethering and hotspot settings page using the same.Can anyone tell me the settings value i have to use instead of ACTION_WIRELESS_SETTINGS. Thanks Dheepak ...

For a android system, do anyone know or has anyone tried to use getScanResult() to get multiple BSSIDs for 1 network name(SSID)?

If I use getScanResult() I will be able to get the information about different networks but for example if I am in a school where all access points are under network(SSID) "The school". Will getScanResult() filter out other access points than the one it's closest to and only return 1 BSSID for that network? ...

Wifi access point on HTC desire

How do i configure HTC desire as a wifi access point? Thanks Dheepak ...

how to see if wifi is connected in android

I don't want my user to even try downloading something unless they have wifi connected. However I can only seem to be able to tell if wifi is enabled, but they could still have a 3g connection. android.net.wifi.WifiManager m = (WifiManager) getSystemService(WIFI_SERVICE); android.net.wifi.SupplicantState s = m.getConnectionInfo().get...

Is it possible to establish a P2P connection between two Android phones?

I am able to connect 2 phones through Bluetooth. But is it possible to connect through the wireless network? Any help will be appreciated! Thanks Pradeep ...