-
Notifications
You must be signed in to change notification settings - Fork 97
Sometimes alert keeps sending despite ribbon color #196
Comments
Hi @niccs Testing with some phones it seems clear that there are several instances of various activities that are running which is I think a problem that you've already mentioned before. In addition to solving the problem, could we also look at being "defensive" with the coding of the Ribbon and the Home screen when the alarm is sending? By that I mean, can we test if there are any ongoing processes that might be currently sending? |
Hi @jmatsushita , A possible quick solution is -- In mobile device-- go to settings--> developer options--> Dont keep activities --> this should be turned off If this option is turned on, everytime we open a screen or we press back, a new screen is stacked over the previous one, and so several of various activities can cause possible issues,and so the option should be turned off. To ideally solve this problem, is like re-designing and implementing the app completely new, as the communication is the base of the design. I dont see this to feasible at this point. However, I will look into the coding of ribbon and the defensive style, as you suggested. If I can get the steps to re-produce the issue, will be lot easier to look into. So the devices where you were facing the issue, please let me know the steps o re-produce it. |
Hi @niccs, Thanks for the workaround, but that's not really viable for users. Let's think about the redesign later indeed. For now can you indeed think about ways we can identify that multiple instances of the alert service are running and ensure that the ribbon color is checking if several Alert services are running (and displays red if any service is sending), end that the Stop Alarm button stops all Alert services running. With regards to phones, this happened on pretty old phones which were really slow. I think that what might happen is that the app takes time to change between screens and that it registers button presses several times, which spawns several activities. It might be then that when users go to the calculator, they're seeing a duplicate activity that is looking at the wrong context where the service isn't running. Maybe a way to address this is to prevent double clicking buttons with this click time approach: Also could we mark some of our activities as single instance or single task as suggested here? Please also propose any other solutions you might have in mind! Jun |
Some more thinking after looking at http://developer.android.com/guide/components/tasks-and-back-stack.html I wonder if we could print the content backstack and the background tasks in the debug log to help understand what's going on? Do you think that our views get into different tasks? In which case I guess that
Otherwise this recommendation about preventing the Main activity to be launched several times might be worth implementing as a defensive measure. Could it be applied to the Wizard activity and Main activity to make sure they are the only instances running? This is related to #138
And also related to #73. |
Hi @jmatsushita ,
2)Now the other case is of stacking of activities. There are two independent flows:-- Now for case a)-- stacking of activities is no way interfering in alarm process, as once the setup is completed and after the last "Finish" screen, the hardware trigger service is started and post that , the complete activity stack is destroyed. So we can rule out the case a. Case b) Ideal work flow:-- So if the "Stop Alert" button is visible and pressed, the alert should be stopped, as this is independent of activity screen or activity stacking. And while starting the main activity, it checks the same flag, if this is turned on--"stop alert" button is displayed. Possible issues:- Right now, I am trying to identify more cases. So from alpha users, I need the actual steps of the use-cases, where we are facing issues, then only I can think of possible causes from the existing design point of view. Also from developer options- we need to switch off the "do not keep activities" flag. This is not a work around. By default, this flag comes off with a device. This is for developers to turn On and test the app in all possible cases(which seems is not done in PB app development) |
Could it be a result of the update process as described in the link above?
|
@jmatsushita ,
|
and it's also not showing the "Stop Alarm" button.
The text was updated successfully, but these errors were encountered: