I would like to give me an example on how to connect to a wireless
network.

The following code I have tested does not work...

WifiManager mainWifi = (WifiManager) getSystemService
(Context.WIFI_SERVICE);
WifiConfiguration wfc = new WifiConfiguration();
wfc.SSID = "\"foobar\"";
wfc.priority = 1;
wfc.status = 1;
int idt = mainWifi.addNetwork(wfc);
mainWifi.enableNetwork(idt, true);

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to