I am new to notifications in Android and I want the app to display a notification once every Sunday. I am not sure how to do this when the activity is not running.
Thank you in advance!
You should start reading and understanding how alarms works: here then you can make the alarm activate the notification on given time.
NOTE: that the alarms won't get saved after reboot so you will need to add a boot complete receiver.
Related
Not too experienced with mobile development, but I wanted to know if this was possible.
After the user installs the app (android or ios), the app should at least once a day "wake-up" and show a push notification to the user.
Is this possible?
If I understood you correctly, I believe that you need setup a recurring alarm using AlarmManager. You also need to setup starting alarm service on device reboot. You can write a method that does what you want so it get executed when the alarm runs e.g. show notification. The following links should help you:
Repeat Alarm Example In Android Using AlarmManager
I am a new developer and don't know much about android programming. I am trying to make an app that reminds a user to do a particular thing every day at a specific time (like going to gym at 5:30 pm). I am able to get a notification after clicking of a button but i want this to be done by the app i.e. even if the app is not running it will remind me everyday to go the gym at 5:30. How can I get this???
I tried using AlarmManager but it gives my notification at that time only and sets the alarm for the specified time.
Set repeating alarm. on broadcast receiver start your notification
I want to create a notification for users to remind them to open my app, in case they haven't opened it for more than a week. How can this be accomplished if my app isn't opened?
You can use AlarmManager to schedule and run your notification code. http://developer.android.com/reference/android/app/AlarmManager.html
You can find a lot of tutorials e.g. http://code4reference.com/2012/07/tutorial-on-android-alarmmanager/
So when your app starts you should cancel previous alarm and schedule new alarm to now + one week. This way alarm will be called(and notification displayed) only if app was not opened for more than week
you can try implementing push notifcations. Here is an example from parse. Very easy. You can also do your own. Push Notification
All,
I have some doubt in basics .kindly help me to resolve it. in which scenario we will use Alarm manager and in which scenario we will use Notification.
Here is my understandings-Alarm-General Wakeup alarm
Notification-used to notify new events...
If the above thing is correct please help me where the REMINDER will falls.
Alarm manager is not a user notification system but an event for the phone to wake up and do something at a certain time.
Notifications are what you would use to notify the user of an event.
You can wire this all together using a BroadcastReceiver to capture the alarm manager events and start a notification.
Here's a simple example of how to do it.
I'm new with Android programming. I'm just wondering whether its possible to set up auto notification. For example, every morning at 8am, the app will send a notification to user about something. Is this possible? Which area/class of Android programming should I look at? Thanks!
You should have a look at the Alarm Manager. You will need to use either of the 'set' methods, and give it a PendingIntent that will perform a broadcast or start an intent service that wakes up just to show the notification. For the broadcast, you will need to have a receiver in your app, that makes a Notification and shows it.