No Scroll is an Android application designed to block infinite scrolling behavior across apps using the Android Accessibility Service.
- Phase 1 (MVP): ✅ Completed
- Phase 2 (Enhancements): 🚧 Pending / In Progress
The following features have been implemented and validated:
- Core Blocking Engine: Uses Accessibility Service to interrupt scroll gestures.
- Global Toggle: Simple ON/OFF switch to enable or disable blocking globally.
- Permission Handling: Guided flow to request Accessibility permissions.
- Architecture: MVVM with Jetpack Compose.
- Persistence: Saves state (First launch, Blocking Active) via Preferences.
- Welcome Screen: Introduction and setup guide.
- Accessibility Permission Screen: Redirects user to system settings.
- Home Screen: Main dashboard with the master toggle.
We are now expanding the app to provide granular control and better reliability.
The user must be able to configure how blocking works beyond a simple global switch.
- Block All Apps: Continue supporting the global kill-switch.
- Block Specific Apps:
- Allow users to select specific apps to block (Target focus: Instagram, X).
- Implement an app picker list.
- Stop Blocking: Clear function to disable the service efficiently.
Allow users to take a short break without completely disabling the habit-building tool.
- Functionality: Pause blocking for a specific duration.
- Range: 1 minute to 10 minutes.
- Behavior: Auto-resume blocking after the timer expires.
To ensure the Accessibility Service is not killed by the Android OS, we must request looser battery restrictions.
- Battery Optimization:
- UI prompt on the Home Screen requesting to disable battery optimization.
- Unrestricted Background Access:
- Request "Unrestricted" data/battery usage where applicable to ensure the service stays alive in the background.
- MVVM (simplified)
- Accessibility Service as system-level engine
UI → ViewModel → Preferences
↓
Accessibility Service
Key Rule:
- UI never directly communicates with Accessibility Service. UI writes to Preferences; Service listens to Preferences.
com.example.noscroll
│
├── MainActivity.kt
│
├── accessibility/
│ └── ScrollBlockAccessibilityService.kt
│
├── ui/
│ ├── welcome/
│ │ └── WelcomeScreen.kt
│ │
│ ├── permission/
│ │ └── AccessibilityPermissionScreen.kt
│ │
│ └── home/
│ └── HomeScreen.kt
│
├── viewmodel/
│ └── MainViewModel.kt
│
├── navigation/
│ └── AppNavGraph.kt
│
├── data/
│ └── preferences/
│ └── AppPreferences.kt
│
└── util/
└── PermissionUtils.kt
- Update: Need to store:
blockedPackageNames: Set<String>(for specific app blocking).pauseEndTime: Long(for handling pause logic).
- Update: Logic to check:
- Is the current app in the
blockedPackageNameslist (if not "Block All")? - Is the
pauseEndTime>currentTime? (If yes, allow scrolling).
- Is the current app in the
- Update:
- Add UI for "Pause" (Dropdown or Dialogue).
- Add UI/Navigation to an "App Selection" screen.
- Add Card/Button for "Disable Battery Optimization".
- Update: Add helper methods for Battery Optimization intents.
isFirstLaunch: BooleanisBlockingEnabled: BooleanblockingMode: Enum(ALL_APPS vs SPECIFIC_APPS)blockedApps: Set<String>
isAccessibilityEnabledremainingPauseTimeisBatteryOptimizationDisabled