play/pause function in the media button action block

153 views
Skip to first unread message

dmt...@gmail.com

unread,
Aug 16, 2016, 8:37:39 AM8/16/16
to Automate
Hi!

I've created a flow (visual overview), that starts a Pomodoro in the Clockwork Tomato app, when pressing the play/pause button (located on F9) on my Logitech K380 Bluetooth keyboard via the media button action block.

I also would like to stop an already running Pomodoro with the same play/pause button, but struggle to create a proper flow. The corresponding input argument in "app start" for stopping a Pomodoro is:

package: net.phlam.android.clockworktomato
activity class: net.phlam.android.clockworktomato.shortcuts.Abort

Is this currently possible or do I have to stop a Pomodoro with an other button?

I really appreciated your help and look forward to hearing from you!

Henrik "The Developer" Lindqvist

unread,
Aug 16, 2016, 2:27:07 PM8/16/16
to Automate, dmt...@gmail.com
Try using the Audio player control block instead.

dmt...@gmail.com

unread,
Aug 19, 2016, 1:19:40 PM8/19/16
to Automate, dmt...@gmail.com
I've replaced the media button block with the audio player one, but didn't get a desired outcome, because now a Pomodoro is started, when the bluetooth keyboard is connected.

Can you give me some hints how to use the audio player block properly?

Thanks in advance!

Henrik "The Developer" Lindqvist

unread,
Aug 19, 2016, 5:41:23 PM8/19/16
to Automate, dmt...@gmail.com
The Media button block is used for awaiting headset button presses, the Audio player control block for starting/sopping playback in an audio player.
So you if i understood your flow, you should have replaced the App start block with an Audio player control block with Stop command.

dmt...@gmail.com

unread,
Aug 26, 2016, 1:20:04 PM8/26/16
to Automate, dmt...@gmail.com
I've tried to replace the app start block with the audio player one and also tried other combinations, but never succeeded. Experimenting for days on my own with additional blocks didn't lead to a desirable result. May I ask you do adjust my flow, linked in the first post, in order to get things working?

I simply want to start and stop a Pomodoro within the Clockwork Tomato app with the play/pause button on my bluetooth keyboard.

Best wishes!

Henrik "The Developer" Lindqvist

unread,
Aug 27, 2016, 2:47:36 PM8/27/16
to Automate, dmt...@gmail.com
Hmm, i wrongly thought Pomodoro was an audio player.

Seems like the Clockwork Tomato app supports the Tasker plug-in API, if so try using the Plug-in action block to start/stop.

Dimitrij Lisov

unread,
Aug 27, 2016, 4:49:45 PM8/27/16
to Automate
Yes, Clockwork Tomato indeed supports Tasker, but after activating this feature in the settings menu of Clockwork Tomato and restarting both apps and Android, the plugin action block only shows one app to choose from and it's not Clockwork Tomato.

Do I have to activate something else or is this some kind of a bug?

Henrik "The Developer" Lindqvist

unread,
Aug 28, 2016, 3:08:30 PM8/28/16
to Automate, dmt...@gmail.com
As the Clockwork Tomato app says on it's Tasker preference screen:
"The three timer actions (Start, Skip and Abort) can be triggered from outside Clockwork Tomato. Tasker, and some specific homescreen launchers, can control the timer flow without any user interaction, by calling the appropriate 'activity'."

The appropriate 'activities' that can be started with the App start block are, as seen when the "Pick activity" button is clicked, likely:

Package: com.phlam.android.clockworktomato

Activity class: com.phlam.android.clockworktomato.shortcuts.Abort
Activity class: com.phlam.android.clockworktomato.shortcuts.ShortcutA
Activity class: com.phlam.android.clockworktomato.shortcuts.ShortcutB
Activity class: com.phlam.android.clockworktomato.shortcuts.ShortcutC
Activity class: com.phlam.android.clockworktomato.shortcuts.ShortcutD
Activity class: com.phlam.android.clockworktomato.shortcuts.ShortcutE
Activity class: com.phlam.android.clockworktomato.shortcuts.ShortcutF
Activity class: com.phlam.android.clockworktomato.shortcuts.Skip
Activity class: com.phlam.android.clockworktomato.shortcuts.Start



On Saturday, August 27, 2016 at 10:49:45 PM UTC+2, Dimitrij Lisov wrote:
Yes, Clockwork Tomato indeed supports Tasker, but after activating this feature in the settings menu of Clockwork Tomato and restarting both apps and Android, the plugin action block only shows one app to choose from and it's not Clockwork Tomato.

Do I have to activate something else or is this some kind of a bug?

Dimitrij Lisov

unread,
Aug 28, 2016, 3:27:14 PM8/28/16
to Henrik "The Developer" Lindqvist, Automate
I already use an action block with the proper command to start a Pomodoro, see my first post. There you'll see a screenshot of my linked flow.

I'm just struggling to also pause a Pomodoro with the same "play/pause" button. If that's not possible, then alternatively a Pomodoro could be stopped with the "back" button and skipped with "forward".

What would be the proper way to do this? I've tried to fork the flow, but didn't get much further.

Every help is appreciated!
Reply all
Reply to author
Forward
0 new messages