Access to device light sensor readings (als) and display backlight level - windows-phone-8

Would anyone know how to access the ambient light sensor (als) readings and display backlight level in Windows Phone 8? I would also like to access the display backlight level for Windows 8.

There is no API in Windows Phone to access brightness sensor readings.
For Windows Store apps you can use LightSensor class:
LightSensor sensor = LightSensor.GetDefault();
LightSensorReading reading = sensor.GetCurrentReading();

Related

Get app purchase date for Windows Phone 8.1 and Windows 8.1 applications

Is there a way, either in C# or C++ APIs for Windows Phone 8.1 and Windows 8.1 Metro applications, to get the user's app purchase date or, in case the app has been downloaded for free, the date of the first download? I'm specifically talking about the application's purchase date, not IAPs.
Thank you in advance.
There's few options:
1) Check out Windows.ApplicationModel.Package -class. It's available for 8.1 Store apps and provides information like InstalledDate. Word of warning, some of the properties only work in desktop apps.
2) You should be able to get the app's receipt. Receipt contains PurchaseDate for the product.
3) Manual way: When the app launches for the first time, create a roaming setting / app data where you store the launch date.

Alternative way to obtain WIFI readings in windows phone 8

I worked on Android project to get wifi info, such as: rssi, ssid, mac..
I want to do same that on windows phone 8, but unfortunately not allowed to access to its API in windows phone!
There is any alternative idea to get wifi info in windows 8? in other word: can I read wifi info without using this API?
This topic is very impotent for me and for other developers, so any help would be appreciated.
I don't see any way to get the WiFi SSID information on windows Phone from an app.
You can retrieve device networking information but not specific details for WiFi.
https://msdn.microsoft.com/en-us/library/windows/apps/microsoft.phone.net.networkinformation.devicenetworkinformation(v=vs.105).aspx
You can launch the WiFi settings from your app
https://msdn.microsoft.com/en-us/library/windows/apps/jj662937%28v=vs.105%29.aspx
There is no way to do this in Windows Phone 8.1. This is a new API available to apps, but it is being introduced in Windows 10.
I know it isn't the answer you want to hear, but here is a link to the API (says availability is 10 only) https://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.devices.wifi.aspx

Windows phone profile control programmatically

I am new to windows phone and developing an app to change general to silent mode while reaching a place.
How can i access windows phone profile settings silent/vibrate? is there any way to change profile using GPS while reaching on a specific location?
Or is there any way to create a new profile settings and using these settings instead of built-in one?
It is not possible to access the silent, vibrate and volume settings in the current Windows Phone SDK.
Similair question: How to access silent/vibrate mode for windows phone using C#?

Getting captured video from Windows Phone 8

While Microsoft appears to have a robust video capture API for Windows Phone 8, it appears that any videos captured must be stored in the application's local storage, which is not accessible from the File Explorer when the WinPhone 8 device is connected to a Windows 8 PC.
Also, the app cannot store the videos anywhere the user could easily copy them from the phone. It is limited to its own isolated file system. This stackOverflow posting explains how the Win8 phone is locked down:
Windows Phone 8: Media file access
So, I can capture and store a video, but how do I get it off the phone to somewhere a user can manipulate it?
If you want those captured video off your phone then you can email/share it using ShareMediaTask & then can get that video out off the phone.
May be its not worth your requirement but if the purpose is to get it out off phone then it will help.

How to set video record resolution in Windows Phone 8.

I am trying to capture video using a custom app on windows phone 8.
I am following the guidelines as per the link here.
I am clueless on how to set the resolutoin for the captured video. Currently it is being recorded at a resolution of 640x480 by default.
You are using the VideoCaptureDevice class which is the Windows Phone 7.5 API for recording video. That API by design is limited to 640*480.
If you want more control over the recorded video, you should use the new Windows Phone 8 API: AudioVideoCaptureDevice which has a SetCaptureResolutionAsync method. Of course, it will require a Windows Phone 8 device.