0

I have a Moto E (2015) and I have a hotspot plan that I let my family use. The Moto E has stock Tethering support. However, there are some limitations.

The hotspot would not turn off automatically. This could potentially create two serious problems. One is that the tethered devices continue to tether even when they are at a place with free Wi-Fi. The other issue is that I could forget that my Wi-Fi was used for hotspot and ended up using my Mobile Data when free Wi-Fi is available.

The best I could come up with is manually setup a reminder every time I turn on Hotspot but it is rather cumbersome and it requires me to manually turn hotspot off. I searched around for this topic but I don't see any solution. Would like to hear some better ideas.

2
  • @Firelord The latter one is easily possible with Tasker.
    – GiantTree
    Commented Dec 7, 2015 at 17:04
  • I would be perfectly happy with a time based trigger.
    – some user
    Commented Dec 7, 2015 at 17:09

2 Answers 2

1

There are many apps that can help here.

MacroDroid

It is a free/paid app. Free version would suffice for the goal however.

The macro would be:

  • Trigger: Hotspot Enabled/Disabled → Hotspot Enabled

  • Actions:

    • Wait Before Next Action → set the timer per your needs
    • HotSpot On/Off → Disable HotSpot
  • Constraints: none

This method, due to some technical limitations, may not work on every Android version, though I had success with both Android 4.2.1 and 5.0.2


Automate

It is a free app with in-app purchases. No purchases are required to achieve the goal however.

You would need to create a flowchart like this

(Click image to enlarge)

IMG:

The hotspot blocks can be found under Connectivity section and Delay is under Data & Time. Set the Delay to the timer you need.

Once the flowchart has been created, make sure to install the permission it needs

IMG:

Start the fiber and there you go.

4
  • Unfortunately, neither solution worked on my Moto E. It seems the API to enable/disable Hotspot is private and not supported on all phone.
    – some user
    Commented Dec 9, 2015 at 4:31
  • Ahh, too bad. Could you tell me which Android version are you using?
    – Firelord
    Commented Dec 9, 2015 at 5:59
  • I'm running 5.1
    – some user
    Commented Dec 9, 2015 at 6:15
  • With respect to your first comment, I suppose that's the case for your device because I've now successfully tested my solutions on Android 5.1 ROMs as well.
    – Firelord
    Commented Dec 9, 2015 at 14:09
1

In continuation of my former answer, some other useful apps are:

Automagic

It is a paid app with 10 day free trial version. Use the trial version for testing before attempting to buy the app from store.

Alike Automate, it uses the concept of flowchart. You would have to create a flowchart like this

(Click image to enlarge)

IMG:

The block with rounded edges represents a trigger, the rest are for actions. The app would introduce your with its know-how, so you would know where to look for to create that chart.

Note that Execute Command is executing the command sleep N. Replace N with the number of seconds your timer would have, such as 360 for 6 minutes.


Tasker

It is a paid app with 7 day free trial.

  • Profile: Event → System → Intent Received:

    • Action: android.net.wifi.WIFI_AP_STATE_CHANGED
    • Priority: Highest
    • leave rest of the entries untouched
  • Task: (Actions):

    • Task → If:

      • %wifi_state eq 12
      • OR
      • %wifi_state eq 13
    • Task → Wait → set the timer
    • Net → WiFi Tether → Off

The information about the intent and variable wifi_state came from this reddit thread by TremendoSlap. Anyhow, if you monitor the output of when hotspot gets activated, you would know that the said intent is broadcasted with initial tethering state denoted by 12 to final state 13.


Droid Automation

It is a free/paid app. Free app would be enough for our goal.

Create a profile with following entries:

  • Trigger: Wi-Fi Hotspot state → Become active
  • Task:

    • Various → Sleep → set timer duration
    • Network → Wi-Fi Hotspot → Disable

Everything works fine except that sleep duration cannot be beyond 10 seconds in a task. The simplest workaround is to add multiple tasks with sleep action. It may become impractical to add multiple of such tasks. Hence, you may consider Tasker here.

Under Various there is an option to execute Tasker's task. The Tasker's task would be to wait for N seconds/minutes and turn off Hotspot.

You must log in to answer this question.

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