Scan acces Point (WifiManager)
<p>I’m trying to scan some access points with class WifiManager (StartScan), this scan occur in a touch event but it just makes one scan in each touch. The problem is that I need make this process 10, 20 or the number that I want times; however I don’t know how I can do this. Because I thought that with one for cycle was enough but this method doesn’t work to me.</p>

<p>This is my onTouch method and I need that every time that I touch the screen it repeats 10 times</p>

<pre><code>public boolean onTouch(View v, MotionEvent event) { 
// TODO Auto-generated method stub 
WifiManager w = (WifiManager) getSystemService(Context.WIFI_SERVICE);
texto.setLength(0); 
switch (event.getAction()){ 
case MotionEvent.ACTION_DOWN:
texto.append("down"; posx:(double) event.getX(); posy:(double) event.getY();    
w.startScan(); 
break;
}
return false; 
}
</code></pre>

<p>I tried with the next for cycle but didn’t work me</p>

<pre><code>for(int i=1;i &lt;= 10;i++){ 
w.startScan();
}
</code></pre>

<p>Thanks in advance.</p>
