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

Support for automatic activity tracking? #11

Closed
heythere797 opened this issue Jun 14, 2021 · 10 comments
Closed

Support for automatic activity tracking? #11

heythere797 opened this issue Jun 14, 2021 · 10 comments

Comments

@heythere797
Copy link

heythere797 commented Jun 14, 2021

What I mean is that could you add a feature such that the time spent in that app is automatically counted towards a certain activity without having to manually set the activity every time I spend a certain amount of time in an app?

Like other people I switch apps constantly, and its kind of hard to figure how much time exactly I spend on each app

@heythere797
Copy link
Author

BTW, really nice app and thanks for all the work on it!

@seefernando
Copy link

I do this with Tasker, I post to a personal api when I focus and de focus an app. It would be awesome if there was a way to instead have tasker log activities locally. I don't see any options that could work in tasked currently though.

@EncroachGradually
Copy link

Tasker integration would be great a couple of uses

  • Launch a certain app
  • Tap NFC Card
  • Go to certain location
  • Certain times of day

@KAGEYAM4
Copy link

@seefernando how to do this, can you please explain or export the profile, thank you

@Razeeman
Copy link
Owner

Razeeman commented Oct 31, 2022

Related issues:
#10
#41
#44

Sorry for the late response. Thank you all for the great suggestion. At first this was looking like an enormous feature that would require a lot of different app permissions. But adding integration with third-party applications for automating tasks is a very easy and elegant solution. I've added intents that can start and stop activities from other apps like Tasker. Also added description about automated tracking with specific values to use (Settings - Additional settings - Automated tracking).

Description looks like this:

To enable this behaviour these applications should support sending "intent" or "broadcast intent" with these parameters:

Action - "com.razeeman.util.simpletimetracker.ACTION_START_ACTIVITY" or "com.razeeman.util.simpletimetracker.ACTION_STOP_ACTIVITY".
Extra - "extra_activity_name" with activity name that should be started or stopped.
Package - "com.razeeman.util.simpletimetracker".

Optional parameters for starting activity:
Extra - "extra_record_comment" with record comment.
Extra - "extra_record_tag" with the name of a record tag.

It will be in the next release. But if anyone want to check if it will work correctly I can build a debug version with these changes. Thank you all for the help!

@ColdHotman
Copy link

@Razeeman

I'd love to help out with testing a debug version, I'll use NFC/RFID and NFC Tools to trigger intents and would be happy to report any bugs I find.

@Razeeman
Copy link
Owner

Razeeman commented Nov 17, 2022

@ColdHotman

Hello! Thank you for the help. I've attached debug version in the current development state. It will install separately from the release version, so your data wouldn't be affected, but just in case make a backup file before trying it. New release was planned for this weekend, so if you find any bugs before this, I would be able to fix them right away.

app-debug.apk.zip

@ColdHotman
Copy link

ColdHotman commented Nov 17, 2022

@Razeeman Thank you for the debug version, here are my results:

Intents work great!


com.razeeman.util.simpletimetracker.ACTION_START_ACTIVITY,
com.razeeman.util.simpletimetracker.ACTION_STOP_ACTIVITY,
extra_record_comment and
extra_record_tag

through

com.razeeman.util.simpletimetracker.debug

tested OK on physical hardware, NFC tags.


Multitasking tested OK.


I am able to write NFC chips that, when scanned, starts and stops any pre-defined activity along with a comment or tag if I want (due to limitations in third party app, wasn't able to test both comments and tag at the same time).

Screenshot_20221117-161656_Debug Simple Time Tracker

If there's any undocumented intents or use cases that needs further testing, I'm happy to help. I tried to test everything available through intents and can't think of anything else.

This is pretty cool, thank you for implementing the function, offering me the debug apk and planning on updating the main app!

@pat-richter
Copy link

Can't wait for it. Seems I've restarted my TimeTrackingApp research with perfect timing! Thank you, this is really awesome!

@Razeeman
Copy link
Owner

@ColdHotman Great! Thanks again for testing everything.

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

7 participants