LoginSignup
4
3

More than 3 years have passed since last update.

Androidで起動アプリを固定する方法

Last updated at Posted at 2019-06-13

背景

端末につき専用のアプリだけ起動したい、余計なものを触れられないようにしたいという要望がありました。
業務アプリを開発している人にはあるあるネタだと思います。

Androidでこれを実現する方法を調査しました。

方法

ルートアクティビティのonCreateメソッドにstartLockTask();を追加するだけ!簡単!:clap:

実際の画面

実際の画面では下の画像のようになり、固定化を解除するまでアプリが固定されます。
image.png

4
3
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
4
3