App blocker banner

App blocker

16 devlogs
57h 52m 50s

Creating a leechblock version on android so I don't waste all my time scrolling… android digital wellbeing/focus mode is too easily bypassed

Features!

  • Create a block set
    • Quotas for the block set are shared across apps in the block s…

Creating a leechblock version on android so I don’t waste all my time scrolling… android digital wellbeing/focus mode is too easily bypassed

Features!

  • Create a block set
    • Quotas for the block set are shared across apps in the block set
    • Time based rules to selectively enforce block set during important times
    • Interventions to require user action before allowing an app to open (Enter random code of length or password)
  • Overrides to allow access to apps after their quota has been reached
  • Lockdowns to prevent access to any apps within block sets for a set period
  • Password/random code protection for settings, override, and lockdown cancellation to prevent users from bypassing settings
This project uses AI

Used codex and claude code for some work and heavy debugging/parsing accessibility dumps, used github copilot for autocompletions

Demo Repository

Loading README...

bvuong168

Shipped this project!

Hours: 11.49
Cookies: 🍪 205
Multiplier: 17.87 cookies/hr

Reshipping for all the time i spent debugging the problems on a phone i dont have access to 😭😭

I’ve got a much bigger appreciation for google and Pixel keeping their version of android clean because I had to deal with handling launchers and ui notifications and a bunch of other noise while also not breaking it on my own phone so that i could still be focused. but im finally done!

bvuong168

okay at this point im throwing shit at the wall and seeing what sticks. getting it to work with other OEMs other than pixel, like samsungs, is practically impossible cause i don’t have emulators or phones to test on. works great on pixel and android studio. but im shooting blind here. codex is saving my ass here.

added a block to toggle allowing override during lockdown or no

Attachment
0
bvuong168

Okay my ship failed on a Xiaomi phone and I don’t have a Xiaomi phone to test on so I ended up basically shooting blindly here. I got codex to try and figure out what might possibly be going on and hopefully the solution works.

I also added some QOL changes including fractional lockdown and a little less robust intervention tracking so there aren’t any false retriggers.

Attachment
0
bvuong168

Shipped this project!

Hours: 47.71
Cookies: 🍪 1356
Multiplier: 28.42 cookies/hr

I finished the first version of this app! Working with accessibility service was honestly really frustrating, especially when I was trying to get specific detection within apps. But after a whole lot of pain, I think I’m at the point where the detection is very reliable, which was one of the issues that I encountered while I was developing this app. And this app has honestly been great for my personal screen time usage and has kept me from wasting all my time scrolling. So I’m very happy with how this project turned out!

bvuong168

Putting on the final touches!

I got rid of all the debug stuff, cleaned up the app, built the apk for release, and created the demo video for those that have an ios phone.

Attachment
0
bvuong168

I got rid of in app detection - snapchat stories/spotlight, youtube shorts, instagram reels, incognito mode, because it was genuinely causing me too much grief to keep up and maintain. I kept it in a separate branch so if i ever want to come back to it I can.

I also implemented fully blocking apps, so that they can be completely blocked within a time period. See: unblocked at: never (at this point just uninstall lol), and unblocked at a date in the future based on time based blocking.

Now that my features are basically mostly complete I think I can start rewriting the code to use more fragments than activities, because it is fully activity based right now.

Attachment
Attachment
0
bvuong168

bug busting: the quota was being inaccurate. it was showing the time remaining in the override when there were more generous options available (like additional time after the override) so i updated to make it show the most generous quota, while also picking the strictest block set out of the quota.

i fixed the time based rules not activating when they span an overnight period and made sure overnight rules extend into the next day, and I enabled allowing 0 quota so apps can be fully blocked.

Attachment
1

Comments

sakshisuman25
sakshisuman25 about 2 months ago

looking intractive

bvuong168

I added time based rules! While time based rules are off, the blockset is always in effect. If time-based rules are on, the blockset is only active during the time period. I also went bug-busting and changed the interventions so that they aren’t preset length codes, but they are adjustable to any length depending on just how difficult the user needs the barrier to be.

Attachment
Attachment
0
bvuong168

big addition! I added private tab tracking for most of the major browsers. i use string based detection, but i haven’t had any issues so far with the detection for the other app tabs like reels and stories. i might have to come back and fix it if it ends up bonking out though

Attachment
0
bvuong168

refactoring refactoring refactoring!!

I spent some time cleaning up some of the code I’ve let AI write. There was a bunch of functions that were duplicated and spread out. I might need to go back and take a closer look at things later.

Attachment
0
bvuong168

I added a lockdown feature to completely block all usage for a period of time.

Using this app for myself has been really helpful - I’m saving time for myself (that I can also put back into hacking!) and I’m also learning about how my brain gets around the barriers i put up. this app is really starting to take shape!

Attachment
0
bvuong168

big update!

I added password protection to my override and settings screen, which has helped me stop granting myself extra time easily, but I can still access things when I really need to.

I also added youtube shorts tab detection so the app can now block all major short form video tabs now, while keeping access to everything else

Attachment
0
bvuong168

I added instagram reels specific handling - that way I can keep in contact with my friends on chat but still block myself from scrolling!

Next step is to also add youtube shorts.

Attachment
0
bvuong168

Been fighting a really annoying bug where the timer overlay doesn’t get cleaned up when leaving an app. It even ends up appearing on the lock screen and on the always on display..

I added Snapchat tab detection, because I found I would go to snapchat stories once I ran out of time on tiktok and instagram, but now my app can detect when I go into snapchat stories and block that, while still keeping access to my chats

I also added sorting, so I can find apps alphabetically or by how much time I spend on them

Attachment
0
bvuong168

Fixing in app browsers made it so chrome wouldn’t get tracked even if it got blocked. I fixed that!

I also added decimal quotas, so I can now have quotas for 1.5 minutes or 10.25 minutes if I need.

Attachment
0
bvuong168

Bug busting session: Fixed the timer not resetting when the window resets
Added overlay dragging and persistence of overlay position
Fixed the block screen sometimes display the wrong time and block set name

App’s core functionality is pretty much complete at this point! Just small things to smooth out.

Attachment
0
bvuong168

The overlay kept bugging out, so I had to go through a debug session and add logs to figure out exactly what was going on. But now the overlay works very consistently.

I also added sorting by amount of time spent in the last week so users can choose the top apps they’re spending the most time on to block

Attachment
0
bvuong168

I’ve created a working minimum viable product for my project!

I made the time reset based on the clock, so every 5 minutes will reset at 1:05, 1:10, etc.
At one point the save button didn’t work so I couldn’t save any changes to sets
I had to fix the tracking a couple of times, I tried using accessibility to track, and then realised usagestats was easier to use. But I have to query usagestats a lot because it doesn’t offer granular time frames.

The tracking overlay is frustrating. It keeps disappearing. It works perfectly in debug mode but I had to figure out how to only display when I’m in a block set app and not anywhere else. I’m trying to make it so I can drag the tracker but now I’m running into the same problem where it disappears again.

I tried writing tests to make sure things work and don’t break.

Attachment
Attachment
0