2

For example I have two networks:

  • Two networks - one open hotspot network and one closed private network using WPA.
  • User has access to both networks
  • User has recently connected to both.
  • Both networks have the same signal strength.

Which network is automatically joined? Is it random?

3
  • no it's not random. usually the connection with secure WPA will be chosen. but it's not depend on just one condition there are many other factors like traffic, device availability etc are considered.
    – Spark
    Aug 23, 2016 at 18:58
  • i was writing a big fat answer for you and sadly i accidentally rebooted my phone so it's gone if you are not satisfied with the comment above tell me i will write it again or someone else will
    – Spark
    Aug 23, 2016 at 18:59
  • @Spark I was hoping for a big fat answer or some Google documentation :)
    – stamps
    Aug 23, 2016 at 19:46

2 Answers 2

2

There is this file /data/misc/wifi/wpa_supplicant.conf

Each Network you saved is listed there.

When multiple network blocks are listed in this configuration file, the highest priority one is selected for use or, if multiple networks with the same priority are identified, the first one listed in the configuration file is used.

(copy from http://www.freebsd.org/cgi/man.cgi?wpa_supplicant.conf(5), I think Android behaves the same)

1

There's something called Wi-Fi priority, adjustable for some phones in Settings - WiFi - Advanced - Wi-Fi priority, and also via some apps and Xposed modules like GravityBox. Android maintains this list of remembered access points and assign priorities to each of them.

I can't find an official definition of how the priorities are (re)assigned (Android Developers only tells me that priority exists), but apparently when you are receiving 2 remembered APs and connected to one of them, then connect to the other, the latter one will receive a boost in priority.

I don't have an idea how "private" networks affect how it works, though.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .