SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
9.
Detect low memory devices
public bool Is256MbDevice()
{
// Place call in a try block in case the user is not
// running the most recent version of the Windows Phone OS
// and this method call is not supported.
try
{
var result = (long)DeviceExtendedProperties
.GetValue("ApplicationWorkingSetLimit");
return result < 94371840L;
}
catch (ArgumentOutOfRangeException)
{
// The device has not received the OS update,
// which means the device is a 512-MB device.
return false;
}
}
10.
Detect low memory devices
if (Environment.OSVersion.Version.Build >= 8731)
{
var result = (long)DeviceExtendedProperties
.GetValue("ApplicationWorkingSetLimit");
return result < 94371840L;
}
else
{
return false;
}
11.
Only detect available memory
once
Save the results
(IsolatedStorageSettings)