Inspiration
Other app limiting apps lowkey blow, they either have crazy ads or sometimes straight up not work. I always wanted to self host my own app, and this would be my opportunity to do so.
What it does
AppLimiter is a screen time management tool that tracks your usage in the background and locks you out of targeted applications when your time budget runs out. Users can select multiple apps and assign them a shared time budget within a specific active timeframe. Once the time is exhausted, the native background service instantly triggers a full screen overlay that forces the user back to the home screen.
How we built it
The frontend is built with Flutter and Dart for the user interface. The background tracking and blocking engine is written entirely in native Kotlin for Android. We connected the two environments using a MethodChannel. The Flutter UI serializes the user configuration into JSON and saves it to SharedPreferences. A native Kotlin Foreground Service continuously polls the Android UsageStatsManager to track time spent in restricted apps.
Challenges we ran into
Keeping the background tracker alive was highly difficult. Standard Flutter background processes get terminated by Android battery optimizations. We solved this by writing a native Kotlin foreground service. Passing the list of installed apps and their icons to Flutter caused severe UI lag initially. We fixed this by moving the image processing to Kotlin Coroutines and compressing the icons into WebP byte arrays. We also had to navigate new, strict Android 14 permissions for foreground services.
Accomplishments that we're proud of
We built a seamless bridge between a cross platform UI and a highly specific native Android engine. The blocking mechanism triggers instantly and is exceptionally difficult for a user to bypass. The app successfully processes large amounts of system data without freezing the main thread.
What we learned
We learned exactly how Android restricts background execution to preserve battery life. We gained valuable experience querying OS level APIs to retrieve system states and package information. Building the MethodChannel taught us how to safely pass serialized data and byte arrays between different language environments.
What's next for AppLimiter
We want to implement a secure PIN lock so users cannot easily edit or delete their configurations. The remaining limiting models need to be fully integrated into the backend. We also plan to add usage history charts in the Flutter UI so users can review their screen time metrics over longer periods.
Built With
- flutter
- kotlin
Log in or sign up for Devpost to join the conversation.