如何防止特定设备模型下载我的应用程序

时间:2013-07-27 04:58:48

标签: windows-phone marketplace

我刚刚在商店上启动了一个应用程序,我通过查看我的错误报告来实现,我从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 个答案:

答案 0 :(得分:2)

Lumia 520是一款512 MB的设备,所以你的应用程序因内存问题而崩溃的可能性远大于Lumia 520的特定功能。

据我所知,您可以下载应用程序的唯一控件是您可以在应用程序清单中为应用程序定义的要求,它们都处理NFC,前/后相机等内容。上。

引发应用程序崩溃的异常抛出了什么异常?你能发布堆栈跟踪和相关代码吗?