Interface VisibleScreenTracker
-
- All Implemented Interfaces:
-
io.opentelemetry.android.internal.services.Service,java.io.Closeable,java.lang.AutoCloseable
public interface VisibleScreenTracker implements Service
Wherein we do our best to figure out what "screen" is visible and what was the previously visible "screen".
In general, we favor using the last fragment that was resumed, but fall back to the last resumed activity in case we don't have a fragment.
We always ignore NavHostFragment instances since they aren't ever visible to the user.
We have to treat DialogFragments slightly differently since they don't replace the launching screen, and the launching screen never leaves visibility.
-
-
Method Summary
Modifier and Type Method Description abstract UnitactivityResumed(Activity activity)abstract UnitactivityPaused(Activity activity)abstract UnitfragmentResumed(Fragment fragment)abstract UnitfragmentPaused(Fragment fragment)abstract StringgetPreviouslyVisibleScreen()abstract StringgetCurrentlyVisibleScreen()-
-
Method Detail
-
activityResumed
abstract Unit activityResumed(Activity activity)
-
activityPaused
abstract Unit activityPaused(Activity activity)
-
fragmentResumed
abstract Unit fragmentResumed(Fragment fragment)
-
fragmentPaused
abstract Unit fragmentPaused(Fragment fragment)
-
getPreviouslyVisibleScreen
abstract String getPreviouslyVisibleScreen()
-
getCurrentlyVisibleScreen
abstract String getCurrentlyVisibleScreen()
-
-
-
-