Screen pinning 3rd party apps programmatically

前端 未结 3 1992
刺人心
刺人心 2020-12-13 21:18

After achieving device ownership, I am trying to implement a method to instruct the device to lock any given app into kiosk mode (or screen pinning mode). Since I have devic

3条回答
  •  死守一世寂寞
    2020-12-13 21:36

    I've not enough reputation for a comment, just would point out that for devices with physical buttons (like the Samsung Galaxy Tab A mentioned by @chairman) one way for manage the forced unpinning of your application is to implement in your DeviceAdminReceiver class the following:

    @Override public void onLockTaskModeExiting(Context context, Intent intent)

    So if your user want to for the unpin you can always re-pinning your app ;)

提交回复
热议问题