Mainly, the setTimeoutAfter field. When this field is set to a time that is smaller than the duration for the notification sound, the sound gets cut off when testing on my physical android phone (Pixel 6A). Maybe it ends up not playing at all when testing on an emulator since the notification sound is different with a different duration? Or the noise being cutoff isn't handled in the emulator? I also noticed that increasing the duration of this field leads to unpredictable behaviour (ex. notification noise not playing at all, or only playing for the first notification, etc.). For now, it has been set to a value that leads to the expected behaviour on my phone (sound plays for notification and is not cutoff).
We want the ability in the future for the user to have the option to choose 2 out of the 3 possible input fields:
(1) Interval
(2) Duration
(3) Number of Intervals
Once the user inputs their choice for 2 out of the 3 input fields, the third one is auto-populated and the user can proceed to the next screen after verifying they are happy with their choice.
When you start the timer for the very first time after running the app, the notification with the progress bar is shown when the timer starts
It isn't shown on any subsequent run of the timer
The desired behaviour is for the progress bar notification to never show when starting the timer (like the behaviour currently when running the timer after the first time)
I think it is worth looking into possibilities of eliminating the use of the IntervalCountDownTimer library in the future, since the way we are using it seems a little "hacky"
Utilizing Handler and Runnable might make the app more performant? Not sure..
The styling of the number of beeps on the main screen is slightly off
It also doesn't populate with a value on valid input of the other fields
Proposed Solutions:
Remove this field (easiest option), or
After implementing validation on selection of each Spinner value, add calculation for number of beeps on valid selection (still simple, and maybe preferred)
We need to add code to integrate the functionality between both screens:
(1) Add code so that we are pulling values from the intent within the second screen
(2) Both the duration and interval needs to be converted to be in terms of Milliseconds, before being passed to the second screen
Adam's Suggestion: Add global variables within the Main Activity to house the millisecond values.
Error messages show up one after the other when clicking the submit button multiple times with invalid inputs
If you click the Submit button lots of times and then enter a valid input, the error messages will continue to show in the timer screen
Proposed solution:
Minor issue, but I think the minimum solution should be that if you enter a valid input, the error messages do not show on the second screen (i.e. a valid input clears the queue of error messages)
More complete solution would be to persist the same error message if the user hits the Submit button lots of times, and hide message a set time after the last Submit
Another option could be to disable the submit button until a valid input is selected in the Spinners
I think this is the best option, but requires reworking the validation to execute on selection of each Spinner value
Need to disable the Start button when the timer is running
Proposed Solution:
Either remove or grey-out the button, or
Do nothing on click if timer is running
When timer is running, Start button turns into pause button (preferred)
When the timer is paused, there is a button to resume
Either turn Start into Pause, then Pause into Resume (preferred)
Or, have a separate Pause button and grey-out the Start button when timer is running, then grey out pause when timer is paused and re-enable Start to act like a Resume
When timer is running, Start button turns into pause button (preferred)
When the timer is paused, there is a button to resume
Either turn Start into Pause, then Pause into Resume (preferred)
Or, have a separate Pause button and grey-out the Start button when timer is running, then grey out pause when timer is paused and re-enable Start to act like a Resume
We need to validate that the user has entered appropriate values for duration and interval:
We need to somehow ensure that the interval time divides into the duration
The interval time must be less than or equal to the duration
Also ensure that the correct number of beeps is displayed only if the user has entered appropriate values
Research needed:
Should we perform the validation when the user hits "submit" or as soon as the user enters the values?
How to display the error message? (should a error message be displayed, or just some visual cue indicating to the user that the field they have entered is incorrect ex. Red outline, error text, etc.)
Ensure that user cannot proceed to the second screen without entering appropriate values