From 3cefe9f5239652dfcb6c8b009b0d60bf03e80c5b Mon Sep 17 00:00:00 2001 From: Shivaprasad Bhat Date: Tue, 15 Jun 2021 00:37:27 +0530 Subject: [PATCH] Adding Readme file --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..7138fc4 --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# Android Work Manager - Notify + +## About the app + +> This application is developed to sending the notification periodically using android's WorkManager. Irrespective of the state (open / closed) the application sends a notification to the user. Every 16th minute, user will get a notification + +## Dependencies used in app + +- WorkManager +- Timber (for logging) + +## Steps to Build the App + +- Clone the project from github +- Open the project in Android Studio +- Click the dropdown menu in the toolbar at the top (Open 'Edit Run/Debug configurations' dialog) +- Select "Edit Configurations" +- Click the "+" Button +- Select "Gradle" +- Choose your module as a Gradle project +- In Tasks: enter assemble +- Press Run + +Your debug apk will be generated at `/app/build/outputs/apk/debug/` + +## Setting Periodic Work Request + +```kotlin +val worker = PeriodicWorkRequest.Builder(NotifyWorker::class.java, 15, TimeUnit.MINUTES) + .build() + +WorkManager.getInstance(applicationContext).enqueue(worker) +``` +