Skip to main content

Automagic: Flashlight-A global variable project

With my new phone, I've been automating some repetitive things I need it to do.  Future blog posts will talk about settings I've made for different times of the day.  And a post I've already done talks about using Automagic to get around an Android Auto bug (feature?).

My Google Pixel running Nougat has a nice flashlight feature. It can be turned on my pulling down the setting menu and touching a small icon. That's not always convenient.

I was surprised there was no widget.

I discovered one of the Actions in Automagic was turning on and off the flashlight.

But how to do that without having two of Automagic's widgets, one for on, and another for off?

Then I discovered one of Automagic's Triggers can be a change in a Global Variable. When ever the value of a Global Variable changes, a flow is begun.  And depending on the value of the variable, the path of the flow can be altered.

So I created the flow shown here. A Global Variable named global_flashlight, a binary variable, is the trigger to two other Actions: Flashlight On, and Flashlight Off.

On the main screen of my phone is an Automagic Toggle Widget. When pressed it toggles the value of global_flashlight, thus triggering the flow and turning the light on or off.

Global Variables can be found in the menu on the main screen under Manage.

Download Flow

Comments

Popular posts from this blog

Notes Folder : My new note taking system

I'm in the process of moving to a new way to keep my notes. It would be best to make a separate post on my long time notetaking app, Evernote, and how it now disappoints me.  Bottom line, I no longer trust the company behind Evernote since it was acquired. My first inclination was to finally look at alternatives. like Notion, Joplin, Obsidian, etc. of I was not enamored with any of them, so I gritted my teeth and stayed with Evernote. TThe situation made me think about how I use Evernote. To keep up additional posts on this topic, search on the tag Notes Folder Updates : January 24, 2024 and in updates noted here. Most of the things I store are quick notes, lists, online receipts for online bills, that sort of thing.  Kind of an online file cabinet if you will. If I were a doctoral student though I could see storing PDFs of papers and research materials.  If were working on a large project, then plans, communications etc. would all be there. Back when I began using Evernote way b

Recording your own notes with Google Voice

Note :   April 2016:  Frankly I don't know if this works anymore.  It is 7 years old. I stopped using this when Google Now became useful on my phone, and I could dictate reminders using it. I found a way a while ago to use Google Voice to record a personal note, transcribe it, and email it to me. A recent Lifehacker post "Five Things We'd Like to See in Google Voice" lists that need as their #5 request, so I realized what I'd figured out is not common knowledge. In GV's Contacts, create a Group "Special Transcription" To avoid listening to my standard voice mail when I call, I recorded a short voice mail greeting for this group simply saying "Record note now" I added a contact with my own cell phone number as the only number, and made it the sole member of this group. In GV's phone settings, I edited the settings for my cell phone. In the section "Direct access to voicemail when calling your Google number from th

Ten Years of Evernote

This blog post was set to publish exactly as the day begins on Tuesday, July 31, 2018. That is ten years to the day after my first Evernote  post. With my second note, I was already getting down to business; recording the agreement I'd come to on the phone on a minor business matter. My affection for Evernote has not dimmed since that day ten years ago. Since then, I've accumulated about 7.8 new notes a day. Ironically, I have needed to pull up only a few notes a year. Yet, when I need them, I need them badly and am glad to have Evernote all over again. My philosophy of what to capture is simple : If you encounter something you might remotely want to see again, it goes into Evernote. from a blog post June 1, 2015 I've written here about Evernote than any other topic.  Even wrote a now horribly out-of-date book. Don't get me wrong. If something better comes along that imports my Evernote notes well, I can be enticed to move.  But in t