Android: how to schedule an alarmmanager broadcast event that will be called even if my application is closed?
问题 My app needs to execute a specific task every hour. It does not matter if app is runing, suspended, or even closed. When app is running or suspended, I can do it by just scheduling an AlarmManager broadcastreceiver. But when the application is closed, I have to call "unregisterReceiver" to not leak an intent, and app will never be wake up (or something) to process the task. Then, the question is: how to schedule an alarmmanager task that I don't need to unregister, so it will be called even