Flashlight (2)
<Initialize variable only runs first time app is usef>
A1: Variable Set [ Name:%FLclick To:off Recurse Variables:Off Do Maths:Off Append:Off ] If [ %FLclick !Set ]
A2: If [ %FLclick ~ off ]
A3: Variable Set [ Name:%FLclick To:on Recurse Variables:Off Do Maths:Off Append:Off ]
A4: Set Widget Icon [ Name:On Icon:content://com.android.externalstorage.documents/document/primary%3ATasker%2F.icn%2FlightbulbON.png ]
<On>
A5: Music Play [ File:Tasker/sounds/Click On.mp3 Start:0 Loop:Off Stream:3 Continue Task Immediately:Off Continue Task After Error:On ]
A6: Else
A7: Variable Set [ Name:%FLclick To:off Recurse Variables:Off Do Maths:Off Append:Off ]
A8: Set Widget Icon [ Name:Off Icon:content://com.android.externalstorage.documents/document/primary%3ATasker%2F.icn%2FlightbulbOFF.png ]
<Off>
A9: Music Play [ File:Tasker/sounds/Click Off.mp3 Start:0 Loop:Off Stream:3 Continue Task Immediately:Off Continue Task After Error:On ]
<End>
A10: End If
A11: Torch [ Set:Toggle ]
I created a simple flashlight app with Tasker. I would like to change the app's icon based on the state of the light. Is this possible?
Thanks Rich I think you're under appreciated on this group. You help so many of us. However, I did get it working as a widget. The task had been assigned an icon because I had created an app from the Task. I created another copy of the Task renamed it and didn't assign an icon. The Tasker Task widget worked just fine. Thanks again. Dale
Good idea but it didn't really answer my question. I tried both Task and Shortcut widgets but can't get the icon to change. Here's my export. Maybe someone can tell me what I'm doing wrong.
Flashlight (2)
<Initialize variable only runs first time app is usef>
A1: Variable Set [ Name:%FLclick To:off Recurse Variables:Off Do Maths:Off Append:Off ] If [ %FLclick !Set ]
A2: If [ %FLclick ~ off ]
A3: Variable Set [ Name:%FLclick To:on Recurse Variables:Off Do Maths:Off Append:Off ]
A4: Set Widget Icon [ Name:Flashy Icon:content://com.android.externalstorage.documents/document/primary%3ATasker%2F.icn%2FlightbulbON.png ]
<On>
A5: Music Play [ File:Tasker/sounds/Click On.mp3 Start:0 Loop:Off Stream:3 Continue Task Immediately:Off Continue Task After Error:On ]
A6: Else
A7: Variable Set [ Name:%FLclick To:off Recurse Variables:Off Do Maths:Off Append:Off ]
A8: Set Widget Icon [ Name:Flashy Icon:content://com.android.externalstorage.documents/document/primary%3ATasker%2F.icn%2FlightbulbOFF.png ]