How can i set up screen lock with a password programmatically?

后端 未结 5 1968
死守一世寂寞
死守一世寂寞 2020-11-28 10:30

Is there any one that can help me with a code to set a password to lock the screen ? thx

5条回答
  •  孤城傲影
    2020-11-28 10:55

    Android N is not working , See Here

    Note: This API has been limited as of N for device admins that are not device owner and not profile owner. The password can now only be changed if there is currently no password set. Device owner and profile owner can still do this when user is unlocked and does not have a managed profile.

提交回复
热议问题