Skip to content

vivekjutture/ReFocus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ReFocus ๐Ÿง ๐Ÿ“ฑ

A focus-first Android app to reduce short-form video distractions


๐Ÿšง Project Status: In Progress

โš ๏ธ ReFocus is actively under development and not finished yet.
Features, behavior, and implementation details may change as experimentation continues.


๐ŸŽฏ Motivation

Short-form video feeds like YouTube Shorts and Instagram Reels are engineered for endless engagement.
ReFocus is built for users who want to consume long-form content intentionally and reduce distraction โ€” without rooting, patching, or modifying third-party apps.

This project explores what is realistically possible within official Android and Google Play Store boundaries.


โœจ Core Principles

โœ… Play Store compliant
๐Ÿ”’ No root access
๐Ÿงฉ No patched or modified apps
๐Ÿšซ No sign-in or sign-up
๐Ÿ“ต No data collection
๐Ÿ“Š No analytics or tracking
๐Ÿ“ฆ Local-only processing
๐Ÿ” Transparent use of system APIs


๐Ÿง  Technical Approach (Experimental)

ReFocus experiments with focus-oriented behavioral control using official Android system APIs.

Main components used:

๐Ÿงฉ Android AccessibilityService
๐Ÿ’พ Jetpack DataStore for local preferences

Deliberately NOT used:

โŒ Text labels
โŒ Content descriptions
โŒ View IDs
โŒ URLs
โŒ Network inspection

Multiple approaches were tested and discarded after real-device testing.
This repository documents learning and experimentation, not a guaranteed solution.


๐Ÿšง Current Limitations

ReFocus cannot:

โŒ Reliably remove Shorts from YouTube feeds
โŒ Block ads inside YouTube
โŒ Inspect video URLs or IDs inside the YouTube app
โŒ Guarantee complete suppression of short-form content

These are intentional platform limitations, not implementation bugs.


๐Ÿ”ฎ Future Scope

๐Ÿ“ต Improved focus-based prevention of YouTube Shorts
๐Ÿ“ธ Support for Instagram Reels
๐ŸŽ›๏ธ Per-app focus and restriction rules
๐ŸŽจ UX improvements and clearer user education
๐Ÿš€ Intent-based or launcher-assisted flows
๐Ÿงฉ Jetpack Compose UI migration
๐Ÿงช Continued real-device experimentation


โš™๏ธ Project Setup

๐Ÿงฐ Requirements

๐Ÿ–ฅ๏ธ Android Studio (latest stable)
๐Ÿ“ฑ Android SDK 24+
๐Ÿ’ฌ Kotlin
๐Ÿ“ฒ A real Android device (Accessibility is unreliable on emulators)

๐Ÿš€ Setup Steps

  1. Clone the repository

    git clone https://github.com/vivekjutture/ReFocus.git
  2. Open the cloned folder in Android Studio

  3. Sync Gradle : Allow Android Studio to complete Gradle sync

  4. Run the app : Connect a real device and click Run โ–ถ


๐Ÿ“š Dependencies Used

๐Ÿ“ฆ Where dependencies are added

All dependencies are added in app/build.gradle

  • Jetpack DataStore (Preferences)

    implementation("androidx.datastore:datastore-preferences:1.0.0")

๐Ÿšซ No analytics, ads, or networking libraries are used.


๐Ÿ” Permissions & Accessibility

๐Ÿ“„ Where permissions are declared

Permissions are declared in AndroidManifest.xml

๐Ÿ”‘ Accessibility Service permission

<uses-permission android:name="android.permission.BIND_ACCESSIBILITY_SERVICE" />

๐Ÿงฉ Accessibility Service declaration

<service
    android:name=".RefocusAccessibilityService"
    android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"
    android:exported="false">

๐Ÿ“œ Accessibility configuration reference

android:resource="@xml/accessibility_service_config"


๐Ÿ” Why Accessibility is used

Accessibility is used only to:

๐Ÿ‘€ Observe app navigation events
๐Ÿ›‘ Enforce focus-related behavior
๐Ÿ“ต Prevent entry into short-form video experiences

Important guarantees:

๐Ÿ”’ No content is read or stored
๐ŸŒ No data leaves the device
๐Ÿ“œ Usage is disclosed and Play Store compliant


๐Ÿ—‚๏ธ Project Structure

app/
โ”œโ”€โ”€ src/main/
โ”‚   โ”œโ”€โ”€ java/com/example/refocus/
โ”‚   โ”‚   โ”œโ”€โ”€ MainActivity.kt                         # App entry point
โ”‚   โ”‚   โ”œโ”€โ”€ RefocusAccessibilityService.kt          # Accessibility logic
โ”‚   โ”‚   โ”œโ”€โ”€ RefocusDataStore.kt                     # Preference storage
โ”‚   โ”œโ”€โ”€ res/
โ”‚   โ”‚   โ”œโ”€โ”€ layout/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ activity_main.xml                   # Main UI layout
โ”‚   โ”‚   โ”œโ”€โ”€ xml/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ accessibility_service_config.xml    # Accessibility service config
โ”‚   โ”‚   โ”œโ”€โ”€ values/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ strings.xml                         # App strings
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ themes.xml                          # App theme
โ”‚   โ”‚   โ”œโ”€โ”€ values-night/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ themes.xml                          # Dark theme
โ”‚   โ””โ”€โ”€ AndroidManifest.xml                         # Permissions & services
โ””โ”€โ”€ build.gradle                                    # App-level dependencies

๐Ÿค Contributing

Contributions are welcome and encouraged.

  • Fork the project
  • Create your Feature Branch git checkout -b feature/NewFeature
  • Commit your changes git commit -m "Add New Feature"
  • Push to the branch git push origin feature/NewFeature
  • Open a Pull Request

Please read the full contribution guidelines here: ๐Ÿ‘‰ CONTRIBUTING.md


๐Ÿ” Privacy

ReFocus does not collect, store, or transmit any personal data.
Read the full privacy policy here: ๐Ÿ‘‰ PRIVACY_POLICY.md


๐Ÿ“„ License

This project is licensed under the Apache License 2.0. ๐Ÿ‘‰ LICENSE


๐Ÿšซ Out-of-Scope Contributions

โŒ Root-only solutions
โŒ Patched or modified third-party apps
โŒ DRM or ad-bypass techniques
โŒ Hidden or deceptive behavior


๐Ÿ” Accessibility & Transparency

๐Ÿ”’ No user data collection
๐ŸŒ No network calls
๐Ÿ“Š No analytics
๐Ÿ•ต๏ธ No background surveillance

Accessibility usage exists only to support focus-related behavior.


โš ๏ธ Disclaimer

ReFocus is: โ— Not affiliated with Google, YouTube, Meta, or any other platform
โ— Not a YouTube mod or ad blocker
โ— Not guaranteed to block all short-form content

If your goal is complete removal of Shorts and ads, patched clients or alternative front-ends may be more effective โ€” but those are out of scope by design.


๐Ÿงญ Why This Repository Exists

๐Ÿง  Explore the real limits of Android system APIs
๐Ÿ“š Document what works and what doesnโ€™t
๐Ÿ› ๏ธ Share honest engineering lessons
๐ŸŒฑ Encourage healthier, more intentional content consumption

ReFocus prioritizes legality, transparency, and sustainability over hacks or shortcuts.

About

A focus-first Android app to reduce short-form video distractions.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors

Languages