adobe / aepsdk-assurance-android

Adobe Experience Platform Assurance SDK
Apache License 2.0
2 stars 5 forks source link

Always show floating button during Assurance session reconnection #117

Closed prudrabhat closed 5 months ago

prudrabhat commented 5 months ago

Description

Currently, the floating button is not shown when the SDK is attempting to reconnect to a previous session (immediately after app launch) until the re-connection is successful. This behavior in 3.x may cause a confusion when there is a prolonged time taken during reconnection - example:

  1. SDK connects to a session -> Floating button is shown
  2. App is closed
  3. Device gets disconnected from network
  4. App is launched again when disconnected from network -> Floating button is not shown (despite active)
  5. a significant amount of time passes
  6. Device gets is connected to network
  7. SDK connects to a session -> Floating button is shown

The bug occurs because reconnection flow attempts to update the graphic for a button that has never been active/shown. This is a regression from 2.x where the floating button shows up (with a disconnected icon) indicating that reconnection is in progress. This PR fixes the behavior to always show the floating button during reconnecting state before updating to show disconnected graphic and always remove the floating button on any disconnection.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

Checklist: