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)
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.
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)
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
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
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)
6 matches
Mail list logo