An Android application designed to maintain a persistent service with a wake lock, ensuring that specific tasks run without being interrupted by the system putting the device to sleep.
- Wake Lock Service: Ensures that the service keeps running without letting the device go into deep sleep.
- Foreground Notification: Provides a visual indication that the service is running, complete with a cancel action to stop it.
-
Clone the repository:
git clone https://github.com/yash10019coder/Wake-Lock.git
-
Open in Android Studio:
Navigate to the directory and open the project in Android Studio. Build and run the application on an emulator or a real device.
- Start the Service: Service will be automatically started as you open the application.
- Notification: Once the service starts, a sticky notification will appear in the notification drawer, indicating that the service is running.
- Stop the Service: To stop the service, you can press the "Cancel" button on the notification.
- Android SDK.
- Kotlin standard library.
-
What is a wake lock?
A wake lock is a mechanism in Android that lets you signal the system to keep the device's screen and/or CPU on.
-
Why use this app?
This app is useful for cases where you need to ensure a service/task runs uninterrupted by the device's sleep cycles.
- Fork the project.
- Create your feature branch (
git checkout -b feature/AmazingFeature
). - Commit your changes (
git commit -m 'Add some AmazingFeature'
). - Push to the branch (
git push origin feature/AmazingFeature
). - Open a pull request.
Distributed under the GNU GENERAL Public License. See LICENSE
for more information.