Reported by a customer in #mobile-support it looks like an oversight on our part for some of the possible outcomes from creating an overlay activity on top of an existing activity that was presenting an experience.
changes:
When transitioning from RenderingStep to EndingExperience we will always pass in the AwaitDismissEffect to ensure that it will always fire up a new ui state in AppcuesViewModel.
Since the reported issue was this error message java.lang.IllegalStateException: Method removeObserver must be called on the main thread when removing the view we will ensure to do all the processing from the main thread
In some scenarios when there is another activity on top the view was not properly getting removed, this is because when we call "getParentView" we are looking for the topMost decorView available, when multiple activities are in display we can get a different decorView from the first one we got when its time to do cleanup, to avoid this we are storing the view that was used to show the experience.
Reported by a customer in #mobile-support it looks like an oversight on our part for some of the possible outcomes from creating an overlay activity on top of an existing activity that was presenting an experience.
changes:
When transitioning from RenderingStep to EndingExperience we will always pass in the AwaitDismissEffect to ensure that it will always fire up a new ui state in AppcuesViewModel.
Since the reported issue was this error message
java.lang.IllegalStateException: Method removeObserver must be called on the main thread
when removing the view we will ensure to do all the processing from the main threadIn some scenarios when there is another activity on top the view was not properly getting removed, this is because when we call "getParentView" we are looking for the topMost decorView available, when multiple activities are in display we can get a different decorView from the first one we got when its time to do cleanup, to avoid this we are storing the view that was used to show the experience.