Disable screen shot in my android app

前端 未结 1 474
梦毁少年i
梦毁少年i 2021-02-06 07:47

I have my current android application which do not allow user to take screen shot.

I am using getWindow().setFlags(LayoutParams.

相关标签:
1条回答
  • 2021-02-06 08:19

    Instead of prompting the 3rd party app, consider using a MapActivity.

    Then you can you can place a MapView in the layout and show the Map. In this case, you will be able to control the restriction via the secure flag.

    Just place the same code in the onCreate() method like you did on the other activity.

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