我剛剛在商店中啓動了一個應用程序,並且通過檢查我的錯誤報告發現我從MSDN拿到的一個通用片段在Lumia 520設備上崩潰。我可以阻止52x所有者下載此應用程序嗎?如何防止特定設備型號下載我的應用程序
[編輯]
下面的代碼:
// Use the back sensor as the default sensor
CameraSensorLocation defaultSensor = CameraSensorLocation.Back;
// If the user already configured the front sensor, use it (true=front, false=back)
if ((bool)appSettings["sensor"]) { defaultSensor = CameraSensorLocation.Front; frontMode.Visibility = System.Windows.Visibility.Visible; }
// Let's check which sensors exist
var availableLocations = PhotoCaptureDevice.AvailableSensorLocations;
// There comes the bug
var captureRes = PhotoCaptureDevice.GetAvailableCaptureResolutions(defaultSensor);
這裏的異常(不包含內部異常):
異常消息:
The request is not supported. (Exception from HRESULT: 0x80070032)
堆棧跟蹤:
at Windows.Phone.Media.Capture.PhotoCaptureDevice.GetAvailableCaptureResolutions (CameraSensorLocation sensor)
at Vixl.Pages.ShootPage.<openCamera>d__c.MoveNext() --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__0(Object state)
GetAvailableCaptureResolutions
爲異步方法,相關部分是僅在堆棧的頂部的第一級異常消息。傳感器是後部傳感器,而不是前部傳感器。我會調查這個具體的錯誤。
對我來說這也沒有任何意義。它在應用程序啓動後的1.3秒內崩潰在GetAvailableCaptureResolutions上。如果你擁有這些設備之一,應用程序是http://www.windowsphone.com/en-us/store/app/vixl/e5c5f3b6-ae5d-4571-bcdb-0b23035fcad7 –
當然,我會打開一個關於這個特定問題的問題。 –