How to block screenshot using JS on Mobile iOS/Android? [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm trying to stop the screenshot event on mobile using JavaScript, because on PC is easier, I used only the event keyCode == 44 to stop.
Thanks a lot.

This is not possible, hence screenshot thing is iOS native features and independent to any app, you can not stop taking screenshot by coding for app.

You can prevent user from taking screenshots with Flags in Android
getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE);
There is another solution for IOS devices where you can prevent taking screenshots programatically but I don't think there is a solution with JS.
EDIT: Those solutions for the applications not for a website!

Related

If you release a browser game to the web. How do you prevent people from making a copy out of your game? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 months ago.
Improve this question
Apologies in advance if I'm missing something obvious here. But to my knowledge, all the code: css, html and JS, are available to anyone visiting your website (or playing your game on the web). How do they prevent people from stealing the original content?
You can use obfuscating tools to make your code less readable.
Also it's possible to make it harder to open devtools on your website.
But it is still not enough. You cannot just prevent somebody from doing something on the Internet. Everything you release to the web is accessible and copyable.

How to take a screenshot of active previous window from angular web application? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
Is there any way to take screenshot of previous active window from our web application? As of now I'm using html2canvas to take screenshot of current window of my webapp, but I need to take a screenshot of my previous active window.(Ex : if I open eclipse first and then open my webapp, from webapp I want to take a screenshot of previous active window means eclipse.)
Is it possible from angular or javascript?
No.
JavaScript running in a web browser is sandboxed and instances where it can interact with applications outside the browser are extremely limited. Taking screenshots of other applications is not one of the exceptions.

High-Speed Website Screenshots with Python [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I need to take screenshots of a website continuously and pipe these data into a python array as fast as possible. Desirable would be at least 30 fps. It would be nice to have one screenshot/frame per function call, because I have to inject some JavaScript to the website after each frame.
The website is running a webgl canvas and is expecting keyboard input.
I already tried to make it with selenium and headless Firefox, but this is way too slow. What do you think is the best way to go to get close to my requirements?
Thanks in advance.
I would recommend to use Python MSS. This library is intended exactly to take screenshots really fast. It is currently maintainable and cross-platform, and has good documentation.

How to save a website shortcut on your desktop using java script [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
How to save a website shortcut on your desktop using java script ?
Using JavaScript this is not possible, it is a security feature implemented by browsers. Spammy websites would abuse this feature.
I don't think it is possible : adding to desktop is an OS thing ; JS through browser is not allow to do that. I might be wrong but I'll be surprised.
You can invite the user to do so in a nice enthusiastic modal though!

How facebook and google can detect my device [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I was wonder how facebook and google redial different links for different devices and also they redial there lite veesion to the android or IOS opera mini too. So i research a little bit and got some idea about detection user agent with java script but I can't find any real answer or code so that I can use it for my website.
So anyone know how its done and get me that code and I also think the php code would be the best if its possible cause user could disable there javascript.
Using PHP:
var_dump( $_SERVER['HTTP_USER_AGENT'] );
More at: PHP.net
Using Javascript:
alert( navigator.userAgent );
More at: W3School.com

Categories