I know of 2 networks with the same SSID but different credentials (via a "sign in to network" webpage). I only have an account for one of them (and it happens to be somewhere with little-to-no 3G/4G so I can't just turn this network off completely). Of course, when it connects to the network I can't use, it turns off my 4G.

I've seen this answer suggesting it could be done using tasker. I don't currently have tasker but could buy it for this. But I have a few issues with that approach:

  • I don't really want my GPS polling all the time for (mainly) battery life reasons.

  • So: Will tasker do this with network-based locations (especially as one location has poor mobile signal - the same place is inside a big building so GPS might not work)?

  • The answer I've linked to wasn't accepted despite seeming to answer the question pretty well, and has no upvotes. It doesn't make me confident it would work.

I'm on a non-rooted Xperia Z3 compact, bought from Amazon so it should be Sony's stock Lollipop.

  • 1
    In case the hesitancy is caused because of the app being paid, you can consider the 7-day full trial version of Tasker.
    – Firelord
    Commented Mar 30, 2016 at 11:24
  • @Firelord thank you. 7 days starting on the right day might do the trick.
    – Chris H
    Commented Mar 30, 2016 at 11:41
  • 1
    And you can extend it in 7-day intervals (export config, uninstall, reinstall, import config – the dev himself says so). As for GPS: use other conditions as e.g. "WiFi near" (which should match perfectly as you only want that task to fire when the specific WiFi is in reach – no need if it is e.g. switched off ;)
    – Izzy
    Commented Mar 30, 2016 at 11:51
  • 2
    @ChrisH if you feel you really need that to evaluate you can do so (sometimes one starts checking, then lacks time, and then trial is over before one finished checking). Once you've decided you like it, you should of course buy it :)
    – Izzy
    Commented Mar 30, 2016 at 13:08
  • 1
    Combine conditions then. In this case, I'd use either "CellID" (collect IDs of towers, uses no extra power as it needs those anyway for calls/mobile-data) or "network location", and "WiFi near" as second condition. Tasker is intelligent enough to then check WiFi only if the other condition is met. You also could have a second profile turning your WiFi on if {location} is met.
    – Izzy
    Commented Apr 1, 2016 at 14:25

2 Answers 2


You can use the free 'WLAN' App from AVM. With it you can choose your hotspot connected to. But it does not work automatically.

  • I was really looking for an automated solution. The many WiFi switching apps would mean manual switching several times a day and as I want to maintain data connectivity wherever possible the chances of forgetting are too high.
    – Chris H
    Commented Apr 15, 2016 at 9:06

The solution was indeed to use tasker but there were some subtleties.

  • WiFi off doesn't appear to work if the "sign in to network" alert is active.
  • This can be solved by using a task consisting of WiFi disconnect followed by WiFi off.
  • Such a two-part task doesn't undo itself when the profile is no longer active, so an exit task is needed to turn the WiFi back on.

"Cell near" seems to work better than "Network location", which can sometimes jump by more than the distance between the 2 locations I'm worried about (~1km) due to some strange singal effects.

  • I've put in a self-answer as the subleties may be handy for others - but credit should really go to @Izzy for getting me over the first major hurdles.
    – Chris H
    Commented Apr 15, 2016 at 9:07
  • Note that as of 2021 this will no longer work on a non-rooted device. Google don't let you automate control of your WiFi any more (I did indeed pay for Tasker, and now use it for something comparable on long bike rides - a battery-saving process that sets aeroplane mode for 14 minutes, connects for 1 minute, and loops)
    – Chris H
    Commented Dec 14, 2021 at 12:39

You must log in to answer this question.

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