How to disable Toast Messages generated in Screen Pinning?

前端 未结 2 2163
梦谈多话
梦谈多话 2021-02-12 19:42

i\'m developing lockscreen application, and i want to disable home button,

my app is - Device Owner and Device Administrator

now i\'m usnig screen pinning for di

2条回答
  •  渐次进展
    2021-02-12 20:16

    Assuming you used the ADB to list your app as a Device Owner, you can use a similar command prompt to disable all toast messages:

    adb shell appops set android TOAST_WINDOW deny
    

    For this command to work, cd to the directory where your adb.exe resides (except if you added it to the PATH). This will disable all toast messages to the android device that is connected (virtual or not). If there are multiple devices, the first one found will be selected.

提交回复
热议问题