title: Wifi roaming connection sequence
body: <p>I am maintaining a small app related to wifi networks. It tests internet connectivity when the phone connected to a wifi network.</p>
  
  <p>While testing and using the app in a place with two neighbouring wifi networks (different SSIDs) with slightly overlapping coverage with a HTC Desire running Android 2.2.2, the sequence of disconnecting and connecting when moving from wifi A to B seems to be:</p>
  
  <ol>
  <li>Disconnect from wifi A</li>
  <li>Connect to wifi B</li>
  </ol>
  
  <p>Now with a Fairphone running 4.2.2, the sequence seems to be:</p>
  
  <ol>
  <li>Connect to wifi B</li>
  <li>Disconnect from wifi A</li>
  </ol>
  
  <p>Does this mean that unlike the HTC Desire, the Fairphone does some sort of roaming and first connects to the wifi whose signal became stronger than the one of the current wifi connection, and then drops the "old" wifi connection?</p>
  
  <p>I am asking this question because if my observations are correct, this has some implications on the app's behaviour, i.e. it should not consider the last wifi connectivity event but rather check the actual state of wifi connectivity regardless if the last event was "connected" or "disconnected".</p>