-2

I would like to ask some questions and getting your advise regarding to reminder notification, I have no experience in coding Java and this is my first trying develop Android app. My apologize for if my questions are duplicated.

The brief of what I need is : In my app, I have a setting for user to set Reminder and they can choose what time(from ListPreference) to keep remind them daily.

So my question is which one should I use

  1. AlarmManager - as same as this Implement Notification Reminder? But I have a doubt on this, if the apps is not running(not opened) will the reminder still sending?
  2. Firebase Cloud Messaging - If use FCM, how do I schedule and trigger to send push notification for reminder at specific timing to specific user?
  3. Any Other simple method?

I have tried this method--> Write a function with nodejs to check the data change in Firebase to send notification to the app; deployed nodejs to Firebase Function. But the thing is i don't know how to schedule a job to keep changing data in firebase, it works when i manual keyin data. I think this is not the correct way, should not talking to database just to implement a simple daily reminder. Also this is not recommend method, right?

Hope I will get simplest advise from you all. Thanks

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

1 Answers1

0

You could use the AlarmManager to set daily reminder but its not highly accurate after API Level 19(Kitkat) And yes it will work when you app stops no issue but if your phone restarts you need to use the broadcast receiver which trigger when phone reboot and set the alarm again.

Or you could use this library Evernote android job which is very efficient when it comes to Scheduling and reminders. I am using it in my app which have schedules on daily and weekly basis and its working perfectly.

  • thank you. I am trying Alarming manager now. But I am encounter other issue. – user1397859 Oct 28 '17 at 09:41
  • The issue is after I get the notification alarm, when i click on that notification, a new alarm is received again. Every time i click the notification message I will receive a new one. – user1397859 Oct 28 '17 at 09:52