I'm developing a timer/interval type app with the following characteristics:
* User can "design" a sequence of steps that can then be executed, and can save their sequence to device storage. They can re-open the saved sequence later.
* The app has three activities: A) show previously saved sequences plus a button to create a new sequence; B) show the steps in a re-opened sequence, add/delete/re-order steps, plus a button to execute the sequence; C) show the current execution, including which step is being executed, how long left etc.
* Once executing (see C) the app will display current step, time remaining etc. as well as generating various countdown-type sounds
* Once execution is finished, the app will display a summary of the executed steps, time taken etc. then drop back to the edit activity (see B).
My design-type questions are to do with using Services vs. using Activities:
1) The app should continue executing until done or the user says "stop". Even if the user switches to another app, even if the UI activities are destroyed by Android to free up resources. I'm thinking therefore that the part of the app that executes the steps and generates the sounds should be coded as a Service, or could be coded within the Starter service - make sense?
2) If the user does switch apps and the UI activities are destroyed, the Starter service will continue to run and when the user restarts the app (presses the app icon on the home screen), Android will switch to the (still active) starter service which will load the Main UI activity again even while the timer/sounds continue - correct?
3) In order to ensure a seamless user experience I'll need to keep track of the UI "breadcrumbs" that the user generated when starting the current execution (e.g. choose saved sequence -> view steps -> execute) so that if the UI activities are destroyed when the app restarts, the breadcrumbs can be used to put the user at the execute UI activity (and then later once done, then user will "return" to the view steps UI activity. Also correct?
In summary: Use a Service or the Starter service to execute a sequence of steps; use the UI activities to choose a sequence to execute, to show the user the current execution (by communicating with the Service/Starter service; on Activity startup, check for an active execution and if found, put the user where they were when the sequence was started.
Any design advice would be very much appreciated.
* User can "design" a sequence of steps that can then be executed, and can save their sequence to device storage. They can re-open the saved sequence later.
* The app has three activities: A) show previously saved sequences plus a button to create a new sequence; B) show the steps in a re-opened sequence, add/delete/re-order steps, plus a button to execute the sequence; C) show the current execution, including which step is being executed, how long left etc.
* Once executing (see C) the app will display current step, time remaining etc. as well as generating various countdown-type sounds
* Once execution is finished, the app will display a summary of the executed steps, time taken etc. then drop back to the edit activity (see B).
My design-type questions are to do with using Services vs. using Activities:
1) The app should continue executing until done or the user says "stop". Even if the user switches to another app, even if the UI activities are destroyed by Android to free up resources. I'm thinking therefore that the part of the app that executes the steps and generates the sounds should be coded as a Service, or could be coded within the Starter service - make sense?
2) If the user does switch apps and the UI activities are destroyed, the Starter service will continue to run and when the user restarts the app (presses the app icon on the home screen), Android will switch to the (still active) starter service which will load the Main UI activity again even while the timer/sounds continue - correct?
3) In order to ensure a seamless user experience I'll need to keep track of the UI "breadcrumbs" that the user generated when starting the current execution (e.g. choose saved sequence -> view steps -> execute) so that if the UI activities are destroyed when the app restarts, the breadcrumbs can be used to put the user at the execute UI activity (and then later once done, then user will "return" to the view steps UI activity. Also correct?
In summary: Use a Service or the Starter service to execute a sequence of steps; use the UI activities to choose a sequence to execute, to show the user the current execution (by communicating with the Service/Starter service; on Activity startup, check for an active execution and if found, put the user where they were when the sequence was started.
Any design advice would be very much appreciated.
Last edited: