How do I prevent Android taking a screenshot when my app goes to the background?

前端 未结 6 1175
说谎
说谎 2020-11-22 08:15

The app I\'m currently building has the requirement that the app has to prevent the OS to take a screenshot of the app when it\'s being pushed into the background for securi

6条回答
  •  既然无缘
    2020-11-22 08:27

    Here is a solution for hiding content of an app by covering it with a splash screen when the app is put into the background. This is not using the FLAG_SECURE technique, I simply override the onPause and onResume methods of the screens and modify the view to show one that covers everything in the back.

    https://stackoverflow.com/a/52976001/6686912

提交回复
热议问题