Disable screen capture wp7 - windows-phone-7

I am developing a security related windows phone application. I need to disable/block screen capture for my application.
In Android, we used to set a flag FLAG_SECURE to the window of which we want to block the screen capture. Is there anything similar in wp7 also??
Thanks

You can't do screen captures on Windows Phone unless you use homebrew apps, so I wouldn't worry too much about it.
And even if there were screen capture apps on the marketplace, you would have no way to be safe. Even if you found a way to prevent screen captures, how would you prevent users from taking a picture of the phone with a camera, or sideloading the app on the emulator then making screen captures of the emulator?

There's currently no API available to developers that allows you to perform screen captures with a locked device.
The alternatives are as follows:
Unlock your device and sideload one of the homebrew based screen
capture apps.
Take a picture of the screen itself (Crude but it
would do the job).
Microsoft have stated that they do not intend to change this in the near future (CNET Article)

Related

Detect Touch Event of Windows Phone on any screen

Since, I am new to Windows Phone technology ,so I want to detect touch event of Windows phone screen that means if I have touched on any screen on Windows Phone not necessary in application only outside of application (like start screen,settings screen) so can I get that touch event or any pixel information regarding that touch.Any help would be greatly appreciated .
Thanks you.
To protect the privacy of the user, there is no way to globally hook all touch events from an application. You can only react to events within your application.
Further, an application cannot access the screen while other applications are active. That would be a significant privacy hole if an application could record the actions of other applications.

Locking the user screen in Windows store apps for Windows Surface

I am developing an application for Windows Surface RT.I have an requirement to lock the device screen
programmatically(thru c#). I searched MSDN and various form but in vain. Please help me to figure out this requirement.
You can't force the screen to be "locked" from a Windows Store application. It's just not an available API.

Is there an analogue of Windows Phone 'User Idle Detection' in Windows 8?

I've used the following code on Windows Phone 7 and 8 to disable user idle detection when my App is displaying data to the user and they are unlikely to interact with the screen e.g. A recipe App where the screen needs to stay on:
http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.phoneapplicationservice.useridledetectionmode(v=vs.92).aspx
Does anyone know if there is an analogue of this available for Windows 8 applications? My tablet app has the same requirement to disable the screen turning off. I haven't managed to find anything :-(
Many thanks,
Jon
You should use the DisplayRequest class, specifically DisplayRequest.RequestActive for this purpose. You must also remember to call DisplayRequest.RequestRelease once you are done to allow the display to sleep, for example, if you are not viewing a recipe, or you are in a menu screen, etc.

CameraCaptureTask in Windows Phone 8 - auto saves to camera roll

I have an existing application developed for Windows Phone 7, which uses CameraCaptureTask.
The captured image is returned back to the app, which will be processed for grayscale conversion.
While testing the same app (same binary to be precise) in Windows Phone 8 Lumia 920, I figured that a copy of all the images captured through the CameraCaptureTask are saved in "camera roll" folder.
This is a bit annoying as the users of my app are not expecting the captured images crowding the "camera roll" folder. I looked up the documentation http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394006(v=vs.105).aspx and found the below quote,
On Windows Phone 8, if the user accepts a photo taken with the camera capture task, the photo is automatically saved to the phone’s camera roll. On previous versions of Windows Phone, the photo is not automatically saved.
So far I couldn't find a way to avoid this case in Windows Phone 8.
Is there a way to turn off this feature before calling the CameraCaptureTask's Show() method in Windows Phone 8?
No. This is a consumer feature request implemented on WP8 that's transparent to developers. The usecase here is that a consumer uses the CameraCaptureTask to line up a perfect shot, doesn't use it an app for whatever reason and can't find it ever again later.
As a side-note, I actually had this happen a few times to me when using various twitter and photo editing apps and it's quite annoying.
Makes no sense. CameraCaptureTask was created to allow apps to capture photos for the app use, not for users to push them into Camera Roll. That is what Lenses are for (either custom code can write into camera roll as well).
It is not transparent to developers because one of my apps has just been removed from the WP8 market. They say because can cause "undesired upload of an app photo to skydrive".
Justin are you sure it isn't a bug? is it going to be fixed?
This forces me to break my development into 2 now: WP7 and WP8. I don't want that hassle right now...

WP7 Screen Shot Requirements

Microsoft declined to submit my application because I took a screen shot of the game which included the actual emulator.
Looking at this answer, the person says that I should us the snipping tool when I have made the phone emulator at 100%. And indeed, the snipping tools spits out an image of that screen at exactly 480x800 which is exactly what Microsoft wants. However, whenever I use the snipping tool, there is still the top black border of the WP7 remaining. I've looked at a few images on the Marketplace and other applications have it as well...I think. Some don't. Can anyone advice me on this please? How I can avoid getting penalised...again.
Will this suffice?
If you update to the Windows Phone 7.1 SDK and Emulator, the new emulator has a built-in screenshot function to take screenshots without these issues.
I have never had my app rejected due to a screenshot taken from the emulator, I can't say you wont have issues, but assuming everything else in your screenshot checks out; the images from the emulator are the correct size and should be approved.

Resources