BroadcastReceiver (TIME_TICK) dies every night?

放肆的年华 提交于 2019-12-01 01:33:28

I also tried to use the AlarmManager, but the problem is the same

AlarmManager is a far better answer than ACTION_TIME_TICK, particularly if you let the user configure the polling frequency (including an option for "never poll, please, as I like my battery and bandwidth usage to stay low").

Please feel free to ask a separate StackOverflow question regarding whatever problems you feel your are experiencing with it.

But every night the service is terminated and will never be called again

Android can and will terminate your process at any point, either by user request or due to old age.

Manifest-entries:

The <receiver> is pointless, as you cannot register for ACTION_TIME_TICK via the manifest.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!