I need to send a notification on a specific day once a month even if my app is closed. How can I do it using Kotlin? I've tried a lot and even some Java code, but it didn't work.
CodePudding user response:
This answer explains how to set monthly alarms. https://stackoverflow.com/a/25784137/4491971
You can use it to set the alarm and then on trigger of the event, you can use it to set pending intent for your notification.
CodePudding user response:
A notification like a push notification? or just an inside app notification? I read that you want your app to give a message even if its closed, so should be better use a push notification with firebase cloud messaging, check out the docs here on how to import your project to firebase and link it to your android studio ide: https://firebase.google.com/docs/cloud-messaging?hl=en-us