Tasker to take candid snapshot by pressing volume key
if desktop toggle widget created by tasker task is tapped
-------------Edited on Feb. 28, 13
To perform this mission, there would be two parts.
first part, create a profile as below.
profile: (candid snapshot)
Context1: state-variable -variable value, name: %Candidshot,
operator:match, value:On
Context2: event-variable -variable set, variable: %VOLM, value:
%VOLM -----value must be specified, if any volume
amount, the media volume must meet the specified amount to get fired. Here, I
set it with %VOLM, so whatever reduce or increase would still fire. if ringer
volume, it would give out a ringer tone for each pressing, so, as a workaround,
I choose media volume, and set up a muted recording file as source for
playback. So that, there would be no pressing tone anymore.
Task:
Action 1:media-take photo, camera:rear, filename:candidshot,
naming sequence:chronological, insert in gallery: UN-checked, discreet:checked,
resolution:1024*768(or any other options you prefer)
Action 2:alert-vibrate,time: 200Ms
Action 3: audio settings-media volume, level:11(it is my personal
settings, you may set up to the top), display: off, sound: off
Okay, from the first part, we should see the profile would
trigger if user-defined variable
%Candidshot got the value On, and ringer volume amount had any change.
(whatever reduce or increase)
now, let us get to the second part, create a toggle widget
which is made by tasker task. In order to make it visible and dynamic, I use
the featured set widget icon and set widget label to visualize the on/off
status.
Tap the tab "tasks", create a task as
below.
Task: (Candid Shot)
Action 1: task-If, %Candidshot !~ On
Action 2: variable -variable set, name: %Candidshot, to: On
Action 3: tasker-set widget icon, name: Candid Shot, widget icon: (better pick a
glowing one to show the status)
Action 4: tasker-set widget label, name: Candid Shot, label: candid on
Action 5: media-music play, File: Tasker/muted recording.amr, loop:
checked
Action 6: task-else
Action 7: variable -variable set, name: %Candidshot, to: Off
Action 8: tasker-set widget icon, name: Candid Shot, widget icon: (better pick a gray
one to show the status)
Action 9: tasker-set widget label, name: Candid Shot,
label: candid off
Action 10: media-music stop
Action 11: audio settings-media volume, level:11(it is my personal
settings, you may set up to the top), display: off, sound: off
Action 12: task-End if
well, right now, you may come back
to the launcher desktop, add widget-tasker task, select (Candid Shot),
done!
you may test it with one tap, and
then with second tap,to see if the widget would toggle from on to off, or off
to on with the pre-defined icon and label.
My icon doesn't change.
ReplyDeleteOther than that, it works. So thanks.
ReplyDeleteWhen I am take take snapshot then the phone two time vibrate by tasker
ReplyDelete