This is a autopost bolg frinds we are trying to all latest sports,news,all new update provide for you
Friday, August 25, 2023
Show HN: A simple web app to combat phone addiction https://ift.tt/bTvJt5x
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/kpmgLSq [2] https://ift.tt/GPqs36h [3] https://ift.tt/OxkGXKF... [4] https://ift.tt/f4SRM8u [5] https://ift.tt/QodkVla https://ift.tt/cTWnpyF August 25, 2023 at 02:15AM
Subscribe to:
Post Comments (Atom)
Show HN: Tablr – Supabase with AI Features https://ift.tt/ltABMro
Show HN: Tablr – Supabase with AI Features https://www.tablr.dev/ June 30, 2025 at 04:35AM
-
Show HN: Locksmith – detect locks taken by Postgres migrations https://ift.tt/0cBueJt February 10, 2025 at 02:26AM
-
Show HN: I built a FOSS tool to run your Steam games in the Cloud I wanted to play my Steam games but my aging PC couldn’t keep up, so I bui...
-
Show HN: TNX API – Natural Language Interactions with Your Database Hey HN! I built TNX API to make working with databases as simple as aski...
No comments:
Post a Comment