"START_STICKY" 服务会阻止 android 休眠吗?

Will "START_STICKY" service prevent android from sleeping?

如果我以 "START_STICKY" 模式启动服务(当此服务 启动 时 android 处于 唤醒 ), 这是否确保服务将保持 运行(处于休眠模式/防止 android 休眠)即使屏幕关闭且设备未插入?

换句话说,一旦服务以"START_STICKY"模式启动,是否需要获取唤醒锁以确保android不休眠?或者,是否保证一旦启动这样的服务,android不会休眠,直到该服务被应用程序停止?

does this make sure that the service will keep running (in the sleep mode / prevent android from sleeping) even if the screen is off and the device is not plugged in?

没有

is it required to acquire a wake lock to make sure android doesn't sleep?

是的。