This application is developed to send a 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
- WorkManager
- Timber (for logging)
- 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 <Project Name>/app/build/outputs/apk/debug/
val worker = PeriodicWorkRequest.Builder(NotifyWorker::class.java, 15, TimeUnit.MINUTES)
.build()
WorkManager.getInstance(applicationContext).enqueue(worker)