TiltTok: Scroll Smarter with a Tilt

Scroll with a Tilt, Stay Mindful While You Scroll

Stop Scrolling, Start Tilting

Tilt your phone forward or backward to scroll.

App Showcase

The Tech Behind the Tilt

Building TiltTok involved...

Core Mechanics: Accessibility & Sensors

The heart of TiltTok lies...

  • AccessibilityService: This powerful service allows TiltTok to observe the current foreground app and, crucially, dispatch gesture events (swipes) programmatically. It's used *exclusively* for simulating scroll actions when a valid tilt is detected. No screen content is read, and no data is intercepted.
  • SensorManager & Gyroscope: Listens for changes in the phone's rotation. Raw sensor data can be noisy, so careful processing is essential.
  • Kalman Filter: Implemented a Kalman filter to smooth the raw gyroscope data, reducing jitter and providing a more stable reading of the device's tilt angle and rotational velocity. This filter dynamically adjusts its noise parameters based on the speed of motion for better responsiveness.
  • Gesture Detection Logic: Developed a state machine (tracking IDLE, TILTING, RETURNING states) combined with configurable thresholds (angle, velocity, duration, stability) to accurately distinguish intentional tilt gestures from accidental movements. It checks for phone stability before initiating a gesture and requires the phone to return near center to complete it.

User Experience & Control

Beyond the core scrolling...

  • Mindful Scrolling (Haptics): The optional vibration feedback (VibrationHelper) on each tilt-scroll uses the device's Vibrate API to provide subtle haptic cues, helping users stay conscious of their scrolling activity.
  • Foreground Service & WindowManager: A persistent foreground service ensures the motion detection runs reliably. It also utilizes the WindowManager API to potentially display floating controls (though the main interaction is tilt-based).
  • Customization: Settings like tilt sensitivity, scroll direction inversion, cooldown periods, and target app selection are persisted using Jetpack Proto DataStore, offering a type-safe and efficient way to store user preferences.
  • App Selection: Leverages PackageManager to list installed apps and allows users to select which apps TiltTok should be active in, using UsageStatsManager (with permission) as a fallback for foreground app detection if needed.

Architecture & Stack

The app follows modern...

  • Language & UI: Built entirely in Kotlin, utilizing Coroutines and Flow (specifically StateFlow) for asynchronous operations and reactive state management. The settings UI is built with Jetpack Compose (Material 3).
  • Dependency Injection:Hilt is used for managing dependencies throughout the application.
  • Persistence:Proto DataStore handles storing user settings and application state efficiently.
  • Permissions: Careful handling of necessary permissions (Accessibility, Overlay, Usage Stats, Notifications) with clear explanations to the user using a dedicated PermissionHandler utility.
  • Billing: Integrated the Google Play Billing Library to handle In-App Purchases securely.

Try TiltTok Yourself!

Experience a smarter, more mindful way to scroll. Available on the Google Play Store:

Get it on Google Play
Tilt-Tok - Scroll by simply tilting your phone forward or backward. | Product Hunt