Pomodoro

by vitalizzare

Version 3 (July 16, 2019)

Download (14 downloads)

The idea is to focus on the work for 2 houres, 4 intervals 30 minutes each, with 5 minutes gaps in between and 20 at the end.

The main variables are collected in a dictionary Pomodoro (a 'Variable set' block #131 at the beginning) :

array "Plan": [ 30, 5, 30, 5, 30, 5, 30, 20 ] // Duration of the time intervals in minutes
dictionary "Twitting": {
. . . . int "Interval": 60*5 // Time intervals in seconds, how often to twit during main intervals
. . . . dictionary "isActive": { // Set 1 or 0 to switch twitting on/off during 'work' or 'relax' intervals
. . . . . . . . boolean "atWork": 1
. . . . . . . . boolean "atRelax": 0
. . . . }
}
dictionary "Sound": { // Connect special sounds to indicate events
. . . . string "Work": " ... "
. . . . string "Relax": " ... "
. . . . string "Done": " ... "
. . . . string "Twit": " ... "
}
boolean "isPaused": 0 // a switcher to pause/continue the main fiber, should be zero at the beginning


To change the number and duration of the 'work/relax' intervals set them as the new value of the Pomodoro["Plan"] array. The amount of numbers is the amount of intervals. The value of each number is a duration in minutes of a corresponding interval. The first number is a 'work' interval, the second - 'relax', and so on.

Twitting means 'keep me awaken in case I get distracted'. By default it is activeated for 'work' periods and is deactivated when there's a 'relax' time. Feel free to change it.

Pomodoro["Sound"] keeps the pathes to the tunes for events:

"Work": the next 'work' interval has been started
"Relax": the 'relax' time has been started
"Done": all the intervals passed
"Twit": Wake up and focus on the work!

After start the app shows the number of the current interval, should you 'work' or 'relax', the time to pass and the time, passed from the start of the period. When everything is done it propose to run again or stop. You can pause, continue and stop any time. See the notification area.

The tunes for events are taken from https://github.com/spacerwlesie/Experiments-with-Android/tree/master/Pomodoro/Sounds and saved in the folder Pomodoro_sounds

The app has 29 blocks. The amount of blocks can be shortened up to 13, e.g. see the Pomodoro Nexus Minimalistic at https://github.com/spacerwlesie/Experiments-with-Android/tree/master/Pomodoro
There you'll find other versions.

Tested on Nexus 7 (2013) with Android 6.0.1