Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
372 views
in Technique[技术] by (71.8m points)

android - Doze mode and foreground service

Checking my app's behavior on M Preview device, it seems that its foreground (with active notification) service playing music is not affected by Doze mode. But reading docs it seems that foreground services are exempt only from AppStandby.

What is the real rule?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In this post's comments on Sep 17 Dianne Hackborn writes:

Apps that have been running foreground services (with the associated notification) are not restricted by doze.

So yes, your findings seem to be the intended behavior.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...