Reputation: 1045
I am trying to get the Application max allocated memory detail, for this i have used DeviceExtendedProperties
like this
long maxBytes = (long)DeviceExtendedProperties.GetValue("ApplicationWorkingSetLimit");
but it throws an exception Specified argument was out of the range of valid values.
and the stack trace is
at Microsoft.Phone.Info.ExtendedPropertiesHelper.GetValue(String propertyName, GetValueImplDelegate getValueImpl)
at Microsoft.Phone.Info.DeviceExtendedProperties.GetValue(String propertyName)
i can get long currentBytes =(long)DeviceExtendedProperties.GetValue("ApplicationCurrentMemoryUsage");
properly but wont get ApplicationWorkingSetLimit
.
I go through some blogs and googling for some solution for this i found that DeviceExtendedProperties is deprecated and in place of that DeviceStatus
class is provided.
In DeviceStatus
there is a property called ApplicationMemoryUsageLimit
which gives Application max memory Limit
but
when using this class application shows error class not found for DeviceStatus
in Microsoft.Phone.Info
package. i am Using Windows Phone 7.0 SDK.
Is DeviceStatus class present in WP7.0 or not?
Please help me for this problem of getting ApplicationMaxMemoryLimit in some other way or am I doing some wrong?
Upvotes: 0
Views: 527
Reputation: 16826
DeviceStatus
is not available in the 7.0 SDK. You have to update your applications to target 7.1 at least - all other builds are deprecated. Remember, that 7.0 applications will no longer be supported in the Windows Phone Marketplace.
Upvotes: 2