How to stop service when ACTION_SCREEN_OFF

前端 未结 4 1877
礼貌的吻别
礼貌的吻别 2021-01-14 11:56

I am trying to make my UpdateService for my digital clock widget stop when the screen is turned off to conserve battery, and then back on when the screen is activated. I cur

4条回答
  •  灰色年华
    2021-01-14 12:57

    Maybe you should use

    public class MyReceiver extends BroadcastReceiver {..}
    

    And then use this classname in the manifest

提交回复
热议问题