I scan for all the WIFI networks and then display them in a ListView
. Now I want a click on one of the list items to open a dialog box
asking for confirmation and the password of that access point to be given by the user. (same as the native wifi application do in android)
Asked
Active
Viewed 237 times
1

Shirkrin
- 3,993
- 1
- 29
- 35

Abhishek choudhary
- 209
- 1
- 15
2 Answers
1
try this link How do I connect to a specific Wi-Fi network in Android programmatically? and also add permission in manifest
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />

Community
- 1
- 1

Anjali Tripathi
- 1,477
- 9
- 28
-
i want my app behave same as native wifi app does...that is it opens a dialog box asking for password then make connection... – Abhishek choudhary Mar 03 '14 at 10:46
1
Use wifiReciever.wifiScanList.get(pos).SSID
to get the SSID
and then use WiFiConfiguration
class to connect...

Paritosh
- 2,097
- 3
- 30
- 42