How to use Notification Manager to send messages weekly - android

I am making an application which will send popup messages in the notification bar of the user, these messages have them send agree to a date specified weekly depending on the day, for example every Monday of each week, as I do that in android eclipse? I need besides those messages arrive so the application is closed, now I have a database in sqlite with notifications have to do weekly. Thank You

You can setup an alarm which should fire up a IntentService who in turn will fire up the notification. In the Service you can consult DB in order to decide to set a notification or not.
All this is done not in Eclipse but using Android API.
Yes, after alarm in configured, it will act despite of application running.

Related

Notification scheduling

I am developing an android app which is about meal subsciption.
I update the entire menu(breakfast, lunch , dinner) for each day in the morning( I am using firebase).
Now i want to send scheduled notification to users that is, i want to notify a user at 1pm that this is the coming menu for the lunch similarly i want to notify the user at around 8pm that this is the coming menu of dinner.
What should i use to get this scheduled notification?
I had an idea in mind that when i update the database in the morning. I will send a data payload with the required scheduling time using cloud messanging and schedule the notification on the device itself.
Will this work?
Yes, it will work, I recommend using Worker to schedule notification and take into account receiving notifications while the app is in the background, because your app should have that feature I guess.

Implement daily reminder notification in my app

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
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?
Firebase Cloud Messaging - If use FCM, how do I schedule and trigger to send push notification for reminder at specific timing to specific user?
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
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.

Schedule a Notification after app was closed for 5 days

I want to send the "We miss you" notification to the users who haven't user my app in more than 5 days. Can this be done with Firebase notifications?
I haven't noticed any options when creating a new notification that can see if the app wasn't used or anything similar, so I'm wondering is it possible to retrieve the timestamp of when the app was last accessed and schedule a notification (maybe locally?) using the said timestamp?
You can use implement ActivityLifecycleCallbacks.To know how to implement refer -Automatically log Android lifecycle events using ActivityLifecycleCallbacks?
Once you implement ActivityLifecycleCallbacks you will get callback whenever any of the activity is interacted by the user.
You can send this timestamp to the server everytime user interacts with your app.
The server can maintain 5 min timeout logice and send a push notification to the device.
On receiving the push notification your app can show notification to the user.

Android Local Notification Automatic

I'm using my application GCM push notification. I can send a message to the user via php. But I want to make a push notification can operate on its own. So in practice the day if not used, the application was not used today because you get a push message. If you send me the following hours or user himself he put option is sending messages to alert the user that hour. How do I do this?
Edited:
is can be local notification ? maybe i wrote wrong ? :)
i added this project in my app.but i need more :)
I would get the application to store the last used time somewhere, such as a database table.
Then create a PendingIntent and BroadcastReceiver to fire at the desired time. The broadcast receiver checks the last used time, and creates a standard Notification if the app was not used for that day.

How to set alarm or push notification

I am trying to make a reminder application on Android. I have taken data from the user and saved in a database. How do I trigger an alarm or push notification on user entered date?
To create push notification, you have to register on console API. but I can't post link , because of low reputation and get your own key. Personally I used this tutorial to create and handle push notification.
http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/
but I can't understand why do you need it to alarm user.
To implement alarm after some elapsed time, you can create Service:
http://developer.android.com/reference/android/app/Service.html
There you can create your own alarm or use one of the standard. Sorry, I can't provide code example, because your question is too general.
Insert the information into the Calendar application with the appropriate settings and you will get an alarm when the event occurs.

Categories

Resources