Looks like force stop should prevent app from running and it\'s even disable all app\'s alarms. However I found that notification in Google Calendar still shown fine even after
Well for starters they have a job scheduler system that schedules jobs to executed, these jobs can be stopped , started or resumed. They implement a mechanism to detect crash, think java-script where if a application crashes it can be restarted (nodemon or forever) , in android there are services, which can be started or resume, There is this special service behavior to restart crashed services.
START_REDELIVER_INTENT- tells the system to restart the service after the crash and also redeliver the intents that were present at the time of crash.
The Android 5.0 Lollipop (API 21) release introduces a job scheduler API via the JobScheduler class. This API allows to batch jobs when the device has more resources available. In general this API can be used to schedule everything that is not time critical for the user.
You can also mix Alarms, broadcast receivers and threading coupled with reactive programming to perform the job.Alarms (based on the AlarmManager class) give you a way to perform time-based operations outside the lifetime of your application. For example, you could use an alarm to initiate a long-running operation, such as starting a service once a day to download a weather forecast.
You can attach observables to certain tasks performing specific operations, You can implement asynchronous i/o, computational operations, or even “infinite” streams of data by designing your own Observable.