Cooper
Cooper

Reputation: 15

How to display notification every week?

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?

Upvotes: 1

Views: 1268

Answers (2)

zer02
zer02

Reputation: 4021

you can try implementing push notifcations. Here is an example from parse. Very easy. You can also do your own. Push Notification

Upvotes: 2

Martin Vandzura
Martin Vandzura

Reputation: 3127

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

Upvotes: 2

Related Questions