Reputation: 113
I am currently working on a webpage. One of the requirements is to prevent any ANDROID DEVICE from taking a screenshot of the said page. I found this block of codes but this is in Java. Is there any equivalent javascript or php code for this? Can a webpage detect if a mobile device (Android) is trying to take a screenshot?
public class FlagSecureTestActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(LayoutParams.FLAG_SECURE,
LayoutParams.FLAG_SECURE);
setContentView(R.layout.main);
}
}
Source: How do I prevent Android taking a screenshot when my app goes to the background?
Upvotes: 3
Views: 2409
Reputation: 6895
There is nothing you can do by just having a web page. If you have this requirement, you will also have to make a native android browser also.
Upvotes: 1