1

I want to setup my Verizon Samsung Galaxy S6 (stock/not rooted Android 5.1.1) so that the wifi-hotspot can be automatically enabled and disabled. I was able to set things up nicely with the Trigger app, except that the wifi-hotspot isn't actually enabled and disabled. I tried a few other apps that were unsuccessful as well.

Manually enabling works fine with the stock Mobile Hotspot button. Is there a way that an app can automatically enable/disable the wifi-hotspot with the default settings on this phone or does Android 5.1.1 or the Verizon modifications block this?

Update: This is the log of the WiFi Tether action of Tasker:

21.16.19/E current state: 1
21.16.19/E WiFi Tether: cur: false new: true
21.16.19/M lastWifiDisableAgoMS: 1452568579452
21.16.19/E check AP state
21.16.19/E AP state: 1
21.16.19/M lastWifiDisableAgoMS: 1452568579452
21.16.19/E current state: 1
21.16.19/E curval: 1
21.16.19/E WiFi: cur: false new: false
21.16.19/E wait for 200ms
21.16.19/E wait finished
21.16.19/E WiFi Tether: setWifiEnabled()
21.16.19/Mirror setWifiApEnabled: InvocationTarget: java.lang.reflect.InvocationTargetException, java.lang.SecurityException: ConnectivityService: Neither user 10278 nor current process has android.permission.CONNECTIVITY_INTERNAL.
21.16.19/E WiFi Tether: enable failed
21.16.19/E Action WiFi Tether failed.
  • 2
    Do you have Tasker or MacroDroid or Automate (llama) or AutomateIt or Automagic? Tasker definitely enabled it in my Android 5.1.1. MacroDroid was unsure but worked too. Use Secure Setting if the first things doesn't work. It is also possible that Verizon doesn't provide the necessary APIs. – Firelord Jan 9 '16 at 1:25
0

I don't like this solution for my needs. It's documented in case someone else has a use for it.

Create a task in Tasker with the following actions:

  1. Secure Settings plugin with the "Actions" -> "Launch Activity" configuration

    • Select "Settings" as the app.
    • Choose "[Mobile Hostspot] .wifi.mibileap.WifiApSettings" for the activity to launch.

    This action opens the Mobile Hotspot setting screen where the hotspot can be turned on and off.

  2. AutoInput plugin use the "Action" configuration to record the click on the switch.

This solution has the following drawbacks:

  • Screen needs to be unlocked. (It may be possible to add steps to check if screen is locked and unlock the screen if it is.)
  • The "AutoInput" service needs to be enabled under the Android Accessibility setting. This allows the AutoInput app to interact with the gui.
  • It's a hotchpot of paid apps, fragile setup, and weakens the security of the device.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.