4

I use the wireless hotspot function daily as part of business, providing a wifi network from my Nexus 7 tablet (Lollipop, oem) to other business-essential devices.

When I get back home (alternatively, within range of my home Wifi network), I'd like to have the hotspot automatically turn off, and the tablet to use the wifi network.

Currently, if I forget to turn off the hotspot, I can inadvertently empty or overuse my mobile data, which is obviously quite costly.

So, is there a way to have the hotspot turn off automatically (but not using a timeout) based on location and/or wifi availability?

I would prefer non-root, non-flash-another-ROM solutions but am open to these as well if they're more elegant.

//edit: An additional problem is that work and home are ~300m apart in a rural environment, so geolocation is flakey and the cell tower doesn't change. Wifi presence is the only good discriminant I see...

4
  • 1
    You could try using Tasker to do this automation.
    – Lucky
    Oct 11, 2015 at 9:28
  • On an Android 4 phone, I could configure the hotspot to turn off when unused for N minutes. So it turned off automatically while driving, and I could enable it back very fast. Incredibly convenient. Such a regression they removed this feature. Now, to avoid accidently burning my mobile data, I have to set my laptop to not automatically connect to the hotspot (in addition to switching it on the phone), so it adds a lengthy step and is quite annoying… Aug 9, 2018 at 9:16
  • I have just enabled "turn on wifi automatically" on the phone, hoping that when I'm back home, it connects to the home wifi, which implies turning off the wifi hotspot. We'll see if it works as expected. By the way, to enable this I was forced to select a "network rating provider"… why do I have to let google control this, instead of letting me select my networks myself… Aug 9, 2018 at 9:44
  • So, I have tried it, and stupid phone doesn't automatically connect to the home wifi if the hotspot is turned on. So it doesn't serve my use case. These phones annoy me more and more. Aug 9, 2018 at 10:01

3 Answers 3

3

Other than MacroDroid which is already covered by 3DDario here, you can consider any of the following apps -- none requires root for the goal.

Tasker (paid; 7 day free trial).

  • Profile: Any of the following would do:

    • Location: choose the location
    • State → Net → WiFi Near → fill the details -- I'm unsure whether it would work if the hotspot is enabled.
  • Task → (Action) → Net → WiFi Tether → Off

    Since the final goal is to connect to Wi-Fi at home, another action can be Net → WiFi → Set → On.


Droid Automation (free/paid) may also work here.

  • Trigger: Location area (Geofencing - Beta) → fill the details
  • Task: Networks → Wi-Fi → Enable

The dry run worked for me.


Condi (free) also worked in my test case.

  • Action:

    • Connectivity and Sensors → WiFi Tethering → Off
    • Connectivity and Sensors → WiFi → On
  • Condition: Location → select location

Done!

2
  • Note that as per my experience, Tasker's Location profile is not 100% sure-fire. Wifi Near should be more reliable to make this work.
    – Andrew T.
    Oct 12, 2015 at 4:16
  • Note that Tasker's WiFi Tether action may not work with Android 7/8+, so you might need to use this instead: play.google.com/store/apps/… - you might need root too, depending on the phone.
    – seanf
    Feb 12, 2018 at 7:33
2

You can use MacroDroid. With MacroDroid you can create a 'Trigger' (Wifi state change - Connect to Network your network) and add an ' (Hotspot On/Off). If you want you can also ad a 'Constraints' like "Cell Towers in range".

Sometimes wifi trigger doesn't work. You should select "Cell Tower Change" and select your cell tower (near your home). This solution doesn't require root and should work on Android 4.0+.

You can also use Tasker (but i have never tried it) or Automate.

sorry for my bad english

1
  • 1
    Would the Wifi state change even if the hotspot is active? It is my understanding that when the hotspot is active, the tablet won't connect to other networks (because we're in AP mode). Oct 11, 2015 at 20:09
2

You could try llama, it is an automation app with location-based actions. Follow this steps:

  • In the llama app go to the 'areas' tab (the first on the left), where you have to set up the 'home' location. The app uses the antennas you connect to to identify locations, so you must be home to do it.
  • Then go to 'events' tab (the second) and tap on the plus sign at the bottom of the tab to create a new one
  • Set the 'condition' field to 'enter area' and choose the 'home' option
  • Set the action to 'wifi hotspot' and select 'turn off'. And that's it: as soon as your tablet connect to the telephone cell closer to your house it will turn off the wifi hotspot.

But if you have some time to figure out how it works, Tasker is the best and most complete option.

0

You must log in to answer this question.

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