Show HN: A simple web app to combat phone addiction When I'm stuck on coding something, I find myself reaching for my phone even if I don't have any particular reason to do so. Inspired by Calm's DoNothingFor2Minutes.com which launched on HN 13 years ago [1], I made this simple webapp to see if my friends and I could go an hour without touching our phones. It is surprisingly difficult. According to a 2022 survey [2], the average US adult picks up their phone 352 times per day, or approximately once every 2m43s while they're awake. On browsers that support it (iOS 16.4+, most versions of Android Chrome), it uses the Screen Wake Lock API [3] to keep the page open, and falls back to nosleep.js [4] otherwise. From testing on my iPhone 14 Pro Max running iOS 16.6, battery life only went down 3 or 4 percentage points after an hour with the wake lock. Made this as a web app as a quick demo to be compatible across all mobile devices. As an app, we can probably save more on battery + not have the screen on. One caveat is that on iOS this will actually increase your Screen Time (although hopefully reduce your other category usage). I currently only track time on page through Google Analytics 4. No other calls are made to a server, although if we actually wanted to verify that you kept the page open vs. javascript/inspector-system clock-fu, we could add a verified mode that pings the server every X minutes. As a PWA, possibly due to an iOS/Mobile Safari quirk/bug [5], neither wake lock nor nosleep.js appear to work . [1] https://ift.tt/vfVYDgU [2] https://ift.tt/lFbKjAy [3] https://ift.tt/8dENaCb... [4] https://ift.tt/6qNeWPX [5] https://ift.tt/VRJMgrx https://ift.tt/jio7Fy3 August 25, 2023 at 02:15AM
Show HN: A simple web app to combat phone addiction https://ift.tt/MnPERdx
Related Articles
Show HN: Ban 'Any updates' emails – this is super-efficient client communication https://ift.tt/mLD0arNShow HN: Ban 'Any updates' emails – this is super-efficient client com… Read More
Show HN: Full Text, Full Archive RSS Feeds for Any Blog https://ift.tt/HCGWm6XShow HN: Full Text, Full Archive RSS Feeds for Any Blog https://ift.tt… Read More
Show HN: Hestus – AI Copilot for CAD https://ift.tt/soGbNxzShow HN: Hestus – AI Copilot for CAD Hello! We’re Kevin and Sohrab fro… Read More
Show HN: Icebreaking AI. A free tool to help you find close friends https://ift.tt/dNXVRYxShow HN: Icebreaking AI. A free tool to help you find close friends He… Read More
Show HN: ASim – generate functional mobile apps instantly on your phone https://ift.tt/9M0uZKeShow HN: ASim – generate functional mobile apps instantly on your phon… Read More
Show HN: I made a REST based alternative to GraphQL for PostgreSQL https://ift.tt/jKQJeFYShow HN: I made a REST based alternative to GraphQL for PostgreSQL Hi … Read More
Show HN: Open-source Hacker News for Android client https://ift.tt/SnAGl3aShow HN: Open-source Hacker News for Android client We believe the bes… Read More
Show HN: A modern way to type in African languages https://ift.tt/KrOpXA7Show HN: A modern way to type in African languages Hello HN, I'm pytho… Read More
0 Comments: