Search code examples
androidandroid-servicealarmmanagerandroid-notificationsandroid-alarms

Android Notification Schedule


I am trying to show a popup message on some specific date and time. Say for example a user set a event. I want to remind him on that specific date and time that he is having a even pending. I saw lots of ways to do this with alarm manager, android service like and I am confused which one will be the best to do this. I really don't want to open my app on that notification. Just a alert box is enough for this. And even if my app is not running or after setting event user may reboot his device but still I want receive my notification . Any idea which will be the best way to do this ?

Thanks


Solution

  • I really don't want to open my app on that notification

    If you do not want to open your app on clicking the notification, do not add a PendingIntent to your Notification.

    And even if my app is not running or after setting event user may reboot his device but still I want receive my notification .

    For this, you will need a Service that runs at startup and executes the your logic to determine what events to show to the user.