startSession

fun startSession(ctx: Context, packageName: String)(source)

Starts tracking a new scrolling session for the specified app.

If the user switches to a different app, the previous session is automatically ended before starting a new one. If the same app is already being tracked, the session continues without interruption.

Parameters

ctx

Application context for accessing SharedPreferences

packageName

Package name of the app being scrolled

See also