How to detect user presence in android?

前端 未结 2 1258
隐瞒了意图╮
隐瞒了意图╮ 2021-02-15 20:40

I know in Galaxy Samsung SIII it is possible to configure in settings an option to avoid the screen turns off when user is looking into the screen. I think the phone uses the ca

2条回答
  •  既然无缘
    2021-02-15 21:44

    You can use device's front camera to detect user's face and hence check the presence of the user. The good thing is this can work on any android phone with the front camera.

    Here is the library from GitHub that demonstrates how you can achieve it using Google Play Services' Vission APIs.

提交回复
热议问题