by Ken Tobias
Try this with Proximity Utility. You can do more than this. Anyways, this is not on my original custom actions, it was just an example.
• While screen off: Glide your finger 4 times while screen off will unlock the phone (proximity unlock); 3 times while screen off will turn on torch; otherwise it will just turn on the phone (proximity wake).
• While screen on: if there's any fb notifications, open them; glide your finger 2 times, locks the phone (proximity lock); else it will just say the counter.
• When broadcast "proximityUtility.done" is receive, it will create a new fiber for actions. The parent fiber returns to broadcast receive block so it will catch up if there will be a new broadcast. The broadcast extras will be store on variable a.
• It will check variable a["screen"] to determine if screen is on or not.
• Therefore when screen off, will handle screen off actions (device unlock, torch, etc...) , and 2nd one otherwise.
• Variable a["counter"] tells how many times did you glide your finger.
Because of this, it covers up other flows found in this market i.e. proximity wake, proximity lock, etc...
Happy Visual Coding! 😊
👋Proximity Utility - https://llamalab.com/automate/community/flows/10716
Reviews and ratings can be submitted in the app.