Disable the Screenshot Functionality in Windows Phone 8.1 Apps
Disable the Screenshot Functionality in Windows Phone 8.1 Apps
Join the DZone community and get the full member experience.
Join For FreeJava-based (JDBC) data connectivity to SaaS, NoSQL, and Big Data. Download Now.
Intro
In Windows Phone 8.1, anyone can take a screenshot by pressing the power button and the volume-up key at the same time. A customer was concerned about privacy in their enterprise app and asked me if they could disable this functionality for Windows Phone 8.1 (both WinRT and Silverlight apps). I researched this and found that this could be accomplished with the following code listed below:
For Windows Phone 8.1 Silverlight Apps
public MainPage() { this.InitializeComponent(); if (this.CanSetScreenCaptureEnabled()) { this.SetScreenCaptureEnabled(false); } }
For Windows Phone 8.1 Runtime Apps
public MainPage() { this.InitializeComponent(); ApplicationView.GetForCurrentView().IsScreenCaptureEnabled = false; }
Wrap-Up
I hope this helps someone else out there that runs into the same problem!
Connect any Java based application to your SaaS data. Over 100+ Java-based data source connectors.
Published at DZone with permission of Michael Crump . See the original article here.
Opinions expressed by DZone contributors are their own.
{{ parent.title || parent.header.title}}
{{ parent.tldr }}
{{ parent.linkDescription }}
{{ parent.urlSource.name }}