Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tasker event for goal completion #255

Open
StanczakDominik opened this issue Nov 30, 2024 · 1 comment
Open

Tasker event for goal completion #255

StanczakDominik opened this issue Nov 30, 2024 · 1 comment

Comments

@StanczakDominik
Copy link

I've been trying to set up Tasker automation for goal completion.

As an example: I open up my reader app and, thanks to #11, Tasker starts a reading timer automatically and mutes the phone, and then once my reading goal for the day is done, switches the sound profile back. The first part works great! However, I can't get intercepting the goal completed event to work. I experimented a bit with pulling the data from the notification, which failed because I couldn't identify the particular activity - I just have the app name and that some daily goal was finished, via goal_time_tagday.

But perhaps a much simpler approach would be to add another Tasker event to automated tracking: if "Send events" is enabled in options, when any goal gets finished, send a com.razeeman.util.simpletimetracker.EVENT_COMPLETED_GOAL with all the Extras of existing sent events (at least, at a glance all of them seem applicable?) plus:

  • extra_goal_type filled depending on the goal_time_tagday (so, "session", "day", "week"...)
  • optionally: extra_goal_unit: 1 or "s" depending on whether it's a count or duration goal
  • optionally: extra_goal_value: whatever the value that triggered the goal completion, either number of tracked entries or duration in seconds as per above.

Would this be a welcome addition? :)

@Razeeman
Copy link
Owner

Hello! Thank you for the feedback. This could be done. Can you explain a bit more your usecase, why can't EVENT_STOPPED_ACTIVITY be used for this? To switch sound profile back not on goal reached but on activity stopped. I understand that this is a bit different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants