Screen Tracker provides insight on what UI components are currently on top of the stacks for the target app. More precisely, it detects the currently visible fragment and its activity host. The components are displayed as an overlay on the screen.
-
Import the dependency:
build.gradle
(app):dependencies { implementation 'com.github.catalinghita8:android-screen-tracker:0.3.1-alpha' }
build.gradle
(project):repositories { ... maven { url 'https://jitpack.io' } }
-
Initialize the library in your application class:
class MyApplication: Application() { override fun onCreate() { if (BuildConfig.DEBUG) ScreenTracker.initialize(this) } }
-
Optionally, pass a
TrackerConfiguration
instance to theinitialize
call:ScreenTracker.initialize( application = this, configuration = TrackerConfiguration.Builder() .setIsTrackingFragments(true) .setIsFilteringLibFragments(true) .setTextSize(25f) .setTextHexColor("#FFA500") .setTextGravity(TrackerTextGravity.TOP) .setTextBackgroundHexColor("#FFFF00") .build() )
Check out release notes here.