by Fran T
Based on this original flow by Jason Rumney:
Jason, if you like these updates, please copy back this flow, leave me a review to let me know, and I'll take this one down. Thanks for the great work!
Updates by Fran T:
o Now supports Android Oreo without root access! Thanks to Kevin for identifying the necessary lock screen UI element: https://groups.google.com/forum/m/#!msg/automate-user/ymNjrewtODg/akJgitYtCAAJ
o Added support for devices (like LG) which require Wi-Fi to be disabled before starting the hotspot.
o Don't try to start the hotspot if mobile data is disabled.
o Added handling for when the device is already unlocked.
Turn on the WiFi hotspot when Bluetooth HFP connects, provided the phone is not in power save mode or is charging.
Update to fix loose ends and detect Bluetooth connection properly.