BTW, I am turning off Wi-Fi in my flow before trying to enable the hotspot.
Thanks - any insight is greatly appreciated!
I'm not rooted, but given that I don't even see any permission errors, I'm not sure rooting would even help.
...And I just did a little more research, and it appears that Oreo now has an actual public API to do this now!
https://www.reddit.com/r/tasker/comments/7d6lij/how_to_enable_tasker_to_control_wifi_hotspot_on/
I also checked the Pixel reviews for the plugin here:
https://play.google.com/store/apps/details?id=com.matejdro.taskertethercontrol
Prereqs
- Must be rooted
It's moot now, but before seeing your latest reply, I just now found the source for the Tasker plugin for you:
I just eagerly installed Automate v1.10.5 on my Pixel 2 XL, but am sad to report that although my research that found a way for Wi-Fi hotspot to be enabled on unrooted Oreo 8.1 seemed to work for you (and others), I get the following error:
java.lang.SecurityException: ConnectivityService: Neither user 10138 nor current process has android.permission.TETHER_PRIVILEGED.
I'm running Android 8.1.0, February 5 2018 security patch level. A check on the Automate Google+ group seems to indicate that other Oreo users are able to start the hotspot successfully during alpha testing, but I couldn't tell which version of Android they're running.
Any ideas?
Can that permission be added to Automate's manifest?
https://groups.google.com/forum/m/#!msg/automate-user/ymNjrewtODg/akJgitYtCAAJ
"By ensuring that my Bluetooth device is set up as a Trusted Device, I'm able to wake the screen, press the Unlock button, then press the Hotspot Quick Settings tile to turn the hotspot on and off.
I wrote this little flow which determines whether the block or UI method is required and does the right thing accordingly, so it'll work for all versions of Android:
http://llamalab.com/automate/community/flows/21295
Hope this helps!
2018-08-31 22:31:20.062 INFO 36009@46: Wi-Fi hotspot set state
2018-08-31 22:31:20.064 FAIL 36009@46: android.os.RemoteException: Remote stack trace:
at android.app.ContextImpl.enforce(ContextImpl.java:1812)
at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1840)
at android.net.ConnectivityManager.enforceTetherChangePermission(ConnectivityManager.java:2011)
at com.android.server.ConnectivityService.stopTethering(ConnectivityService.java:3244)
at android.net.IConnectivityManager$Stub.onTransact(IConnectivityManager.java:392)
Yes,it looks like it:
i guess the same solution could work for Automate.
Toggling the hotspot is the last trigger i still have on my Llama setup.
I've tried all workarounds, accepted the one requiring root.
Perhaps the other app is using a different API to the hotspot feature.