Using proximity sensor lock and unlock a home screen

前端 未结 1 1895
挽巷
挽巷 2021-01-14 23:50

I am doing one application using proximity sensor in android. when sensor changed it should lock the phone and when phone is locked using same sensor it should unlock a phon

相关标签:
1条回答
  • 2021-01-15 00:08

    When phone is locked your application gets into standby mode so code writen do no work. You need keep your app open to make it work when phone is locked.for this you need to take granted permission from user and change phone settings before executing this code.

    0 讨论(0)
提交回复
热议问题