I am developing one Flash Light application in Silverlight for windows phone 8. Currently I am deeply stuck in one issue for the use of "Microsoft.Phone.Media.Extended" assembly. Flash Light Application for Windows phone 7 is already live in Windows Phone Marketplace and it is working very fine for Windows Phone 7 but it is not working for Windows Phone 8 because of "Microsoft.Phone.Media.Extended" dll.
After converting WP7 app into wp8 and run then I got this type of error message:
Could not load file or assembly 'Microsoft.Phone.Media.Extended,Version=7.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e' or one of its dependencies. The system can not find file specific."
According to following link for Windows Phone-specific features: http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206947(v=vs.105).aspx
If you were using reflection to access the API in this assembly, because they were not publicly exposed, your app may fail on a Windows Phone 8 device. Remove the calls to this assembly and use the publicly exposed media API.
I an not understanding how to use publicly exposed media API. I used Microsoft.Phone.Media.Extended using reflaction in Windows Phone 7. Is there any direct method for accessing Microsoft.Phone.Media.Extended in Windows Phone 8 or other way to solve this?
Thanks.
========================================================================== Edited Question:
Hi,
As per the thread, we used "VideoTorchMode" enumeration to make flashlight ON. As per that, I used AudioVideoCaptureDevice class using Windows.Phone.Media.Capture namespace with following code:
var objDevice = await AudioVideoCaptureDevice.OpenAsync(CameraSensorLocation.Back, AudioVideoCaptureDevice.GetAvailableCaptureResolution(CameraSensorLocation.Back).First());
objDevice .SetProperty(KnownCameraAudioVideoProperties.VideoTorchMode, VideoTorchMode.On);
I want to keep the flash light on but without capturing video. So, i have not initialized video capture code. The issue is, i don’t have WP8 yet and in simulator i am not able to test this.
Can any one confirm that once i put this code, my app will work as Flashlight-X where light will be on without blinking and also it will not get crashed in WP8.
Thanks