In my android application, I am using the tab view and so I have two tabs: parameters and results.
the user enters the various parameters on the first tab and then switches to the second tab to view the results.
i have a service that performs some long-running calculations. the user enters parameters on the first tab and hits 'calculate'. They can make adjustments and hit 'recalculate' and the service is updated with the new parameters.
As these calculations progress, I want the user to be able to switch to the results tab to view the results of the latest calculation. They would then view the results and be able to switch back to the parameters tab to make adjustments.
I can think of two approaches:
-register the 'results tab' with the service and when the service reaches a milestone, it calls directly to the 'results tab'.
-have a timer running in the 'results tab' and have it query against the bound service on a regular interval and update accordingly.
Do people have comments or recommendations for these two approaches?