🔋 Anti Theft Charge
Safely charge your phone in public places without the worry of it being stolen
Ever need to charge your phone in a pubic space, like a train, hostel or airport? Worried that if your eyes leave your device for just a few seconds it could be snatched? ATC is a simple app, that once enabled will sound an alarm at top volume if your device is unplugged when the screen is off /locked. This should be enough to deter the thief and draw your attention.
I used to sleep in hostels, I'd have my phone on charge by my pillow. After I wrote this app, there were several occasions when people tried to take my device, but they got the fright of their life when the loud alarm went off, each time dropping it and running off 🏃, or claiming they thought it was their phone 😂. So it served it's purpose well 🙌.
How it works
All the logic is in this directory. When the state is set to armed, a service runs in the background watching for power changes and calling an intent that starts the alarm accordingly.
ArmDisarmFunctionality.kt- Manages the UI animations.
AlarmUtil.kt- Manages the alarm functionality
ChargingUtil.kt- Determines connectivity status
NotificationUtil.kt- Handles the notification functionality
PowerConnectionService.kt- Watches for power connectivity changes
Restarter.kt- Keeps the app running in the background, when it is armed
This project is open source, feel free to do anything you like with the code. Licensed under MIT.