[android-developers] Listview in Wifi

2012-08-10 Thread Meena Rengarajan
Here, this is my code, How do i wanna put all the strings which is 
scanned and how do i wanna use Array adapter then how do i wanna get all 
the values from list ?
Can anyone help me here please ?

wifi.startScan();
 int length = 10;
 
String[] str1 =new String[length];
 ListScanResult results = wifi.getScanResults();
 for(int i=0;iresults.size();i++){
 ScanResult result = (ScanResult)results[i];
 str1[i] = result.SSID;
 }
 ArrayAdapterStringadapter=new 
ArrayAdapterString(this,android.R.layout.simple_list_item_1,android.R.id.text1,str1);
 lv.setAdapter(adapter);
// for (ScanResult result : results) {
 
//Toast.makeText(this, result.SSID +   + 
result.level,Toast.LENGTH_SHORT).show();

-- 
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

Re: [android-developers] Listview in Wifi

2012-08-10 Thread TreKing
On Fri, Aug 10, 2012 at 6:39 AM, Meena Rengarajan meenasoft...@gmail.comwrote:

 How do i wanna put all the strings which is scanned and how do i wanna use
 Array adapter then how do i wanna get all the values from list ?


How you wanna do anything is really up to you.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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