XF 2.3 how to disable screenshots?

🔥Iggy🔥

Well-known member
hello,
does anyone have a clear method for this with xenforo? im kind of assuming its only a mobile thing, but i was also curious about that....

kind regards
 
aww...but but...

that sound so definite...

i saw this response by AI and thought maybe it can hook in somewhere/somehow

Disable Screenshot on Mobile App​

To disable screenshots on your mobile app, you can follow these methods depending on the platform:

For Android:

  • You can add WindowManager.LayoutParams.FLAG_SECURE to your window layout to disallow screenshots.167+1
  • This flag can be set in the activity where you want to prevent screenshots by adding the following line of code before setContentView():

    activity.window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)<div data-xf-p="1"></div>
  • For full app protection, you can set this flag in the onCreate() method of your Application class.8
For iOS:

  • To prevent screenshots, you can listen to the UIApplication.userDidTakeScreenshotNotification notification and handle it as needed.2
  • You can also check if a screen is getting captured by using the isCaptured property on UIScreen.2
These methods help enhance the security and privacy of your app by preventing unauthorized screenshots.
 
i heard that paypal does it currently is what got me looking btw...
Screenshots are at OS level, not web application. Remember back 20 years ago when people would disable right clicking via javascript? that was application level, and easily bypassable. Plus, even if you could block it at OS level, you could always virtualise an instance and screenshot via that. There are always ways to work around it. Heck, you could just use another device to take a picture of a screen.
 
Apps have the ability. Browser doesn't. Though Netflix etc have ability to block screenshots in browser for videos using some form of drm which won't work on regular text and images based web pages.

Google tells me that you can potentially remap the screenshot key using javascript but that probably won't block phone screenshots or screenshots taken using apps like sharex on PCs.
 
Back
Top Bottom