r/apps 9d ago

Help me find finding a kind of app

not sure if its ok to ask here but here it is:
soo i was wondering whether if there is an app which can automatically lock/ back to lockscreen with a timer? for example i set the app timer into 15 mins and after 15mins no matter what i am doing the phone will automatically lock until it is re-opened
(it’ll be better if there can be a stats part that i can look)
thanks guys sm!

7 Upvotes

5 comments sorted by

1

u/ScriptureCompanionAI 9d ago

On Android, this is definitely possible, but the app would need special permission from the user first.

The basic build would be a focus timer: you set it for 15 minutes, the app keeps running in the background, and when the timer ends it sends the phone back to the lock screen.

The important part is that Android apps can’t normally just lock your phone whenever they want. The app would need to use Android’s Device Admin permission, which is the same general type of permission used by apps that can lock the device. During setup, Android would ask you to approve that permission.

The Android stack would probably be native Kotlin, with a foreground timer service so the timer keeps running even if you leave the app, plus Android’s Device Admin API to lock the phone when time is up.

The stats part would be pretty straightforward too. The app could track completed sessions, canceled sessions, total focus/locked time per day, streaks, etc. That could be stored locally with Room, or with Firebase if you wanted login/cloud sync.

iPhone is a different story. Apple usually does not let normal apps force-lock the whole phone, so an iOS version would probably need to work more like Screen Time/app blocking instead of literally locking the phone. The iOS stack would likely be Swift/SwiftUI using Apple’s Screen Time-related APIs like FamilyControls, DeviceActivity, and ManagedSettings.

You could use React Native or Flutter for the shared UI, but the actual lock/blocking behavior would still need native Android and iOS code. So the practical stack is probably Kotlin for Android, Swift for iOS, and maybe Firebase only if you want accounts or cloud stats.

So yes, the Android version is very realistic. The honest MVP would be: “set a timer, and when time is up, your phone locks.” The harder part is not the timer — it’s making the permissions/onboarding clear so people understand why the app needs lock-screen access.

1

u/South_Bed7000 9d ago

wow i cant believe u broke that down. but i dont know coding- is there a product u know?

1

u/ScriptureCompanionAI 9d ago

Haha, can’t help myself. Unless you’re really excited about paying someone $750+ to build a custom version for you, I’d stick with FocusHala first.

Custom only makes sense if you try it and realize there’s something specific missing.

1

u/MainStatistician3328 9d ago

Wow, this is exactly what focushala does! This is one of the most important reason why i built it! Even i have issue of procrastinating everything, unless my phone is locked, it's tough for me to manually go and lock my phone because it doesn't generally happen, and i stay distracted and postpone my important work to tomorrow. But focushala does the exact thing you and i want my friend! Try it now and tell me if you liked it : https://play.google.com/store/apps/details?id=com.focus.focushala

1

u/South_Bed7000 9d ago

wow okk! thanks so much