Reputation: 1370
I want my app to display a notification. That notification shall be published regulary (e.g. at 8am and 8pm), but it should only be published if certain things are given.
The examples I found start something in the main activity, but for me that approach is not "clean", because that service is always started when the application is started or it has to be checked if the service is already started.
What is the common way to do that?
Upvotes: 0
Views: 71
Reputation: 266
I think using AlarmManager/BroadcastReceiver is a common way of handling this. A good tutorial can be found here.
Upvotes: 1