5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

端末をスリープにさせない設定の有効範囲は?

Posted at

について、これってどの期間で有効になるのか気になったので調べてみた。

「Activity.onCreate でスリープ抑制、onDestroy で解除」という実装をした時、そのアプリがバックグラウンドにまわった時はどうなるの?というところ。

結論は「ちゃんといい感じで動いてくれた」。
アプリ(というかその Activity)がフォアグラウンドの時は、スリープは期待通り抑制される。
アプリがバックグラウンドにまわった場合は、システムの設定値に応じて、スリープになる。

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?