Inspiration

The social media "doomscrolling" epidemic is a source of frustration, stress and unhappiness for many teenagers in society today. Due to ease of scrolling from media such as TikTok, YouTube Shorts, it is very easy for teenagers to procrastinate on school work, touching grass and talking to other people in real life, all of which has been shown to inhibit personal, intellectual and social development.

Existing solutions such as the device parental care can be easily ignored by just pressing "Ok" to acknowledge said warning and the mobile OS itself does not take steps to curb this addiction.

What it does

The app allows users to blacklist apps by setting a time limit on the daily usage. Upon hitting the daily time limit, scrolling on the application is basically messed up. For example, if the user tries to scroll down on Twitter to view the latest posts, the application will scroll all the way up and prevent the user from viewing more tweets.

How we built it

We first registered our application using Jetpack Compose as an accessibility application which gives it the permission to handle scroll events and display on top of other applications. Then, we run two services, one service which keeps track of time spent in the app by updating the time when a scroll event is created or when the app has been exited. The other service is the overlay service which displays the time limit as a countdown timer at the bottom of the application. Pages that enable CRUD operations on blacklisting of apps, setting of permissions were created.

Challenges we ran into

We ran into several issues with the strength of the Android API. It was more challenging to work with than expected as there were many silent failure cases due to not setting of permissions. More clarity could have been put into the documentation which would have alleviated our developer experience, especially for system-level services like accessibility, with major changes between versions of Android and wildly incompatible methods. Furthermore, the API interoperability between Kotlin and Java with respect to time durations is experimental and inflexible and required a lot of ugly code to work out. As we did not know this beforehand, our independent development efforts used Kotlin and Java durations and due to a lack of time, we were forced to write scrap code to interop both duration formats. Furthermore, the scroll events API does not allow us to slow the scroll delta down to a crippling halt so we had to make it scroll all the way up in response.

Accomplishments that we're proud of

We are proud that within 24 hours, we managed to learn an entirely new tech stack (none of us have dabbled much with Android development using Jetpack Compose before, our experience limited to Flutter and React native).

What we learned

Android development, Jetpack Compose

What's next for ScrLk

Fix bugs

Built With

Share this project:

Updates