a7r3 / LockIt

Android application to manage productivity by setting usage timers
MIT License
4 stars 1 forks source link
android-application apps-whitelisted locker productivity profile rxandroid rxjava2

LockIt

Digital Well-being in Android TV for your kids, (wirelessly) managed!

Left: WiLock Remote Control App
Right: LockIt (this app)

Note: The app cannot be run in emulators, since local service discovery/registration is not supported

Phone Remote Locker app (WiLock) is available here

Android-TV + Phone: Application which locks down selected apps for a child, which can only be unlocked from a Parent's device.

Phone (Redevelopment TODO): Application which sets a timer, within which the child is allowed to use a restricted set of Apps

... Why?

With the day-to-day work by parents, it becomes a difficulty to manage their child's device usage. When given a device with the child assuring "I'll play for 5 mins plsplspls", it usually doesn't happen that way, and the child ends up using for hours :laugh:.

Now, coming to Android TVs, popular App Lock solutions require to enter a PIN in the big picture. Let's not underestimate a child's image processing abilities to pick up the PIN.

Features

Issues / TODO

Issue details:

  • ~Moved to Google Nearby Connections API~

Pairing takes considerable time (5 seconds), is juice consuming, and is unreliable (connectivity time changes randomly)

  • ~Moved to Android NsdManager (for discovery of service) + TCP Sockets (for Server)~

NsdManager's interaction with mdns android daemon works very well (Device Logs and Wireshark Capture Logs say so). But the app isn't informed about any such events at all.

  • Moved to Rx2DNSSD + TCP Sockets (Server)

Interaction with mdnsd works, App's informed about it, Discovery and Connection takes a few ms! Safe to say we've reached the peak.

Working

Android TV (Locked Device) + Phone (Key):

Fresh Start:

  1. (Fresh Start) TV and Phone must connect with each other for the first time. Connections to the TV are open until the remote client connects to it.
  2. Connections hereon will be made directly with the UUID known to the device pair

After Fresh Start:

  1. Lock can either be started manually in the TV App OR can be done directly from the phone
  2. Restricted set of apps will be accessible to the child
  3. Parent can unlock the TV device from their phone, with Biometric ID before every Lock/Unlock transaction

Phone (Redevelopment TODO, not present rn):

  1. Upon Locking, selected apps won't open up.
  2. Above two restrictions are applied for a given time limit by the parent
  3. On crossing the time limit, the Phone is Locked (Sent to Lockscreen)

LICENSE

Project uses the MIT License, you can obtain it at LICENSE