I'm a newbie to Windows Phone application development.
My project requires disabling the screen capture feature provided by default in Windows Phone 8.
Target Platform - Windows 8
After a long search, found a property "IsScreenCaptureEnabled" in the PhoneApplicationPage class, which can be used to enable/disable the screen capture in windows phones.
Unfortunately, the property is available only from Windows 8.1 and available from Windows Phone 8 Update 3 (GDR3)
For reference,
http://code.msdn.microsoft.com/windowsapps/Disable-screen-capture-00efe630
http://code.msdn.microsoft.com/windowsapps/Disable-screen-capture-00efe630/sourcecode?fileId=86655&pathId=2647585
It is also supported for GRD2.
See this link.Hope that helps.
Related
In one of our projects on Win-RT targeting Windows 8.1 , we had used EasClientDeviceInformation() to get the client device information. But, now we want our app to be working on windows 10. So is there anything else that we could be using?
You need not change your code at all. EasClientDeviceInformation API is available on Windows 10 and you can use it in universal windows app and it would work on both Desktop and Phone. MSDN Page for this API lists the detail.
In Windows Phone 8 Silverlight I use
Environment.OSVersion.ToString()
to get Windows Phone version and
DeviceStatus.DeviceManufacturer+" "+DeviceStatus.DeviceName
to get device name.
These APIs no longer work with Windows Phone 8.1 XAML. I have found
Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation()
this seems to return the manufacturer and device name but OS is returned as just "Windows Phone".
Is there a way to get the exact Windows phone version?
This is currently not possible In Windows Runtime 8.1 (Phone and Windows). It does look like it might be planned thanks to Morten Nielsen and Pete Brown
EDIT: This is now possible in Windows 10. See this SO answer as well as this article for more useful features.
For 8.1, you can use this project on Github https://github.com/Microsoft/phone-info that includes an example application for retrieving both static and dynamic properties of a Windows Phone device.
For Windows 10, the APIs that were used to gather these data on (8 and 8.1) have changed. I have found one blog post https://www.suchan.cz/2015/08/uwp-quick-tip-getting-device-os-and-app-info/ for someone who has created a helper class that retrieves the following properties from a Windows 10 UWP app
current OS family - phone/desktop/...
current OS build number - 10.0.10240.16413
current OS architecture - x86/x64/ARM
current App Display Name
current App Version - 3.0.2.0
current Device manufacturer - Nokia
current Device model - Lumia 1520
In his post he shows how to get basic data about current device, operating system and application.
give it a try maybe it helps
In Windows Phone 8.1:
Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation().FriendlyName
It worked for me!
In Windows Phone 8.1 the default ActiovationPolicy changed from Replace to Resume.
I have a Windows Phone 8.1 Silverlight app and I want to use ActivationPolicy="Replace". Changing ActivationPolicy="Resume" to ActivationPolicy="Replace" does not work, the app still resumes.
I remember one video from build claiming that this should work, but is this really possible? If so, what is the way to make the app replace instead of resume?
Windows Phone 8.1 Silverlight apps always resume (http://social.msdn.microsoft.com/Forums/wpapps/en-US/caf0d79a-c55e-4046-afc1-86260c005205/activationpolicyreplace-not-working-in-windows-phone-81?forum=wpdevelop)
I'm writing a Universal App for Windows 8.1 / Windows Phone 8.1 that at some point displays a list of phone numbers. What I would like to do is allow the user to press one of these numbers and have the device call (or ask permission to call) that number if running on Windows Phone 8.1. I know this was previously possible in Windows Phone 8 by doing the following:
using Microsoft.Phone.Tasks;
PhoneCallTask phoneCallTask = new PhoneCallTask();
phoneCallTask.PhoneNumber = "2065550123";
phoneCallTask.DisplayName = "Gage";
phoneCallTask.Show();
NOTE: This code is wrapped in #if WINDOWS_PHONE_APP
However, when trying to import Microsoft.Phone.Tasks, Visual Studio is unable to find the reference. I know that "ID_CAP_PHONEDIALER" had to be enabled in WMAppManifest.xml in Windows Phone 8, but this doesn't seem to be possible with the universal app model. I've been searching around for a solution but can't find a recent one that includes Windows Phone 8.1 (not Silverlight).
Is there any way to make a phone call from within a universal app? Or is it simply not possible at the moment?
In Windows Phone 8.1, We can make phone call by "Windows.ApplicationModel.Calls.PhoneCallManager", just like this:
Windows.ApplicationModel
.Calls.PhoneCallManager
.ShowPhoneCallUI("phone number", "display name");
I have an application for Windows Phone 7. I have created visual studio 2012 in windows 8 desktop. I am trying to use the application in Windows Phone 8 device also with some changes involved. How can I programmatically detect whether the device is Windows Phone 7 or Windows Phone 8?
Just as you would on any other platform with C#: Environment.OSVersion
You can use this toolkit to check the version of the phone:
http://mangopollo.codeplex.com/
bool IsWP8() : Returns if the phone running the application is a
Windows Phone 8
EDIT: If you don't want to use the whole toolkit here is how it checks it:
public static bool IsWP8 { get { return Environment.OSVersion.Version >= TargetedVersion; } }
private static Version TargetedVersion = new Version(8, 0);
Creds to original author.
You shouldn't need to.
Either it is a Windows Phone 7 app and will work on both Windows Phone 7 and Windows Phone 8 devices or it is a Windows Phone 8 application.
A Windows Phone 7 app running on Windows Phone 8 shouldn't be able to do anything that a Windows Phone 7 device shouldn't be able to do.
This article has some good strategies as well.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202996(v=vs.105).aspx
It is not just about run-time either, for example, your code may function one way on wp7 and another on wp8 depending on availability of an API. In this case a #define may the best way to go, because you really don't care what kind of device you are running on, but what SDK you were built against.