How to prevent specific device models from downloading my application

0

I just launched an application on the store, and I'm realizing by checking my bug reports that a generic snippet I took from MSDN is crashing on Lumia 520 devices. Can I prevent 52x owners from downloading this application?

[EDIT]

Here's the code:

// 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);

Here's the exception (which contains no inner exception):

Exception message:

The request is not supported. (Exception from HRESULT: 0x80070032) 

Stacktrace:

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 being an async method, the relevant part is only the first level exception message at the top of the stack. The sensor is the rear sensor, not the front one. I'll investigate in this specific error.

windows-phone
marketplace
asked on Stack Overflow Jul 27, 2013 by Léon Pelletier • edited Jul 28, 2013 by Léon Pelletier

1 Answer

2

The Lumia 520 is a 512 MB device, so it's far more likely that your app is crashing because of a memory issue than that there's something specific to just the Lumia 520.

As far as I know, the only control you have in terms of who can download your app are the requirements you can define for the application in the application manifest and they all deal with things like NFC, front/rear camera and so on.

What kind of exception is being thrown that's causing the application to crash? Can you post the stack trace and relevant code?

answered on Stack Overflow Jul 27, 2013 by Mats Lannér

User contributions licensed under CC BY-SA 3.0