MainActivity

Main activity of the DoomScrolling application.

This activity serves as the main dashboard where users can:

  • View their scrolling statistics (streak, breaks taken, time avoided)
  • Toggle the monitoring service on/off
  • See weekly summaries of their scrolling behavior

The activity handles permission flows, loads configuration from Firebase, and displays real-time statistics about the user's scrolling habits.

Author

DoomScrolling Team

Since

1.0

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun getDefaultApps()
Loads the list of default apps to monitor from Firebase.
Link copied to clipboard
open fun getTimeSettings()
Loads timing configuration from Firebase (warn thresholds, lock duration, etc.).
Link copied to clipboard
open fun getWhitelistApps()
Loads the whitelist of apps that should not trigger monitoring from Firebase.
Link copied to clipboard
Called when all required permissions have been granted.
Link copied to clipboard
protected open fun onCreate(savedInstanceState: Bundle)
Link copied to clipboard
protected open fun onStart()
Link copied to clipboard
Recalculates and updates all UI parameters including streak, breaks taken, weekly statistics, and the mindful circle progress.
Link copied to clipboard
open fun showConfirm(title: String, message: String, positiveText: String, onPositive: Runnable)
Shows a confirmation dialog to the user.
Link copied to clipboard
Starts the permission flow to request all necessary permissions.