[android-developers] Re: Establishing WiFi connection to a chosen hotspot

2009-10-19 Thread Farproc
A final comment: WifiManager.AddNetwork(conf) will fail if the the AP you're trying to connect is protected by password and the password you set in `conf` is incorrect I have been debugging AddNetwork() failure for half a day, MY GOD!!! On 8月22日, 上午7时40分, Roman ( T-Mobile USA)

[android-developers] Re: Establishing WiFi connection to a chosen hotspot

2009-08-21 Thread R Ravichandran
I am receiving some events and not all I am looking for. Here is the simple code that I wrote to experiment with my requirement. All I wanted to accomplish with my code was: 1. get a list of WiFi hot spots. I have a BoadcastReceiver that gets the WifiManager.SCAN_RESULTS_AVAILABLE_ACTION intent.

[android-developers] Re: Establishing WiFi connection to a chosen hotspot

2009-08-21 Thread Roman ( T-Mobile USA)
Ravi, I think your current code looks pretty good. Please be aware that the constant NETWORK_STATE_CHANGED_ACTION maps to android.net.wifi.STATE_CHANGE. I am running nearly the same code and I receive the NETWORK_STATE_CHANGED_ACTION event. Please, make sure that the addNetwork(configuration)

[android-developers] Re: Establishing WiFi connection to a chosen hotspot

2009-08-20 Thread Roman ( T-Mobile USA)
Ravi, I would first try to check out whether in general your code is able to receive the intents you are looking for. You can verify this with configuring the Wifi settings on the phone first and then by turning on/off your AP. If you are bale to see the events, then the next step would be to

[android-developers] Re: Establishing WiFi connection to a chosen hotspot

2009-08-19 Thread Roman ( T-Mobile USA)
Are you using the following permissions? uses-permission android:name=android.permission.ACCESS_NETWORK_STATE/ uses-permission android:name=android.permission.CHANGE_NETWORK_STATE/ uses-permission android:name=android.permission.ACCESS_WIFI_STATE/ uses-permission

[android-developers] Re: Establishing WiFi connection to a chosen hotspot

2009-08-19 Thread R Ravichandran
Roman, I have all the permissions you mentioned, plus the intent filters also in my code. I am trying this code on G1 phone. Still the same problem. What is the right approach to make a wifi connection to a specific hot spot? Thanks Ravi On Wed, Aug 19, 2009 at 4:18 PM, Roman ( T-Mobile USA)