DEV Community

Mingke Tu
Mingke Tu

Posted on

Weekday and weekend limits in my free Android app blocker, and a usage bug that only showed up after updates

I build Ripple, a free Android app for limiting your own phone use or setting limits on a child's phone. No account, no ads, and rules stay on the phone. This post covers two recent releases: v0.1.25 added per-weekday daily limits, and v0.1.26 fixed today's usage being counted too high on some phones after an update install.

Why per-weekday limits

Until v0.1.25 a daily limit was one number for every day. People kept asking for something different on weekends. An adult might want 30 minutes of short videos on workdays and 90 on Saturday. A parent might want a game at 0 minutes on school days and an hour on weekends.

On an app's limit page there is now a "By weekday" option. Each day from Monday to Sunday gets its own value, which can be "No limit" or 0 min (blocked all day). "Quick set" changes Monday to Friday, or Saturday and Sunday, in one go. The block screen, the countdown before a limit and today's usage all read that day's value.

The rule I spent the most time on

Ripple has a delay for loosening rules: any change that relaxes a limit waits (15 minutes by default, 30 minutes, 1 hour or 2 hours) or needs the unlock code. With seven values per app, a change can tighten some days and loosen others at once.

I chose to treat the whole edit as one change. If any day gets looser, the entire edit waits or needs the code, and then applies together. A purely stricter edit applies as soon as you save. Splitting it day by day would have let someone tighten Monday to make the edit look harmless and loosen Saturday in the same save.

Old single limits migrate as the same value on all seven days, so nobody has to set them again.

The usage bug after updates

Some users saw "time used today" jump after installing an update over the old version, and daily limits blocked apps too early. v0.1.26 recounts today's usage from records after midnight, and a number that was already too high corrects itself.

What is not verified

I want to be clear about this. The weekday settings page, the switch to a new day's limit at midnight, and the v0.1.26 usage fix have passed unit and screen tests only. None of them has been checked on a real phone yet. If you try it and something looks wrong, an issue on the repo helps a lot.

iPhone

There is an iPhone version too (iOS 16.0+), but it is still v0.1.5. It blocks apps by time window using Screen Time, with uninstall protection, clock change protection and an unlock code. It has none of the daily limits above.

Links

There is no remote management. All rules are set directly on the phone being limited.

Top comments (1)

Collapse
 
userxnom profile image
Abdullah Naseer •

The whole-edit-as-one-change rule is the decision I would steal — treating a mixed edit as a loosening because someone could tighten Monday to make the save look harmless and loosen Saturday in the same breath is exactly the kind of self-circumvention thinking most limit apps skip. The v0.1.26 fix is honest too: recounting today's usage from records after midnight instead of trusting a number the update inflated. Since the weekday page, the midnight switch and the usage fix have only passed unit and screen tests so far, which of the three worries you most on a real phone — the midnight rollover, or the migration of old single limits onto all seven days?