Accumulate and analyze time spent
ce60ab2e — Tomas Granlund 7 months ago
initial commit


browse  log 



You can also use your local clone with git send-email.


An app for accumulating time. Meant to emulate a conceptual hardware device.

A screenshot of an app

Switch on an accumulator in the app, and it will start accumulating minutes. This allows you to keep track of how long you spend doing certain things, for example, sitting.

Because the app is meant to emulate a very simple hardware device, the minutes overflow, going from 1023 to 0. You're supposed to write down the accumulators once every day and reset them to 0 by pressing the Zero button.



#Java JDK

The d8 tool of the Android SDK requires JDK 11 or later.

Ant likes to run on JDK 8, but Ant is also optional.

#Android SDK Command-line tools

Use sdkmanager to install the following:

  • build-tools;latest
  • cmdline-tools;latest
  • platform-tools
  • platforms;android-18

Make sure that ANDROID_HOME is pointing to the SDK root.


Ant is used by build.sh to compile the java files in src and place the result in build/obj. If you don't like Ant you can use whatever you want to accomplish the same thing.

#Create .apkconfig

.apkconfig should contain the APK_* variables that build.sh uses.

You will need to create a keystore with keytool unless you already have one.

I recommend changing the filesystem permissions of .apkconfig since it contains the password to the keystore.

chmod 600 .apkconfig

#Run the build script

Stand in the project root directory and run ./build.sh. Note that you should probably modify build.sh to your liking: it uses Gentoo-specific commands (eselect) to change the Java JDK before running Ant and d8.


I made a point of not using Gradle, since Gradle is slow and likes to download dependencies from the internet and store enormous caches on your computer. Google made this relatively simple thanks to their documentation on the command-line tools. As a result, I think the apk got a lot smaller too, which is always nice.