software you can take with you

Peter Foot

Microsoft Windows Phone Development MVP

Windows Phone SDK 7.1.1

At MWC today Nokia announced the Lumia 610 which is a lower spec device designed for emerging markets. This is running an updated Windows Phone OS which supports devices with just 256MB of RAM. To enable developers to create apps which support the new lower memory devices Microsoft are releasing an update to the Windows Phone SDK - 7.1.1.

At the moment a CTP has been released so that you can test your applications on a 256MB emulator but you should not install this to your main development machine as it doesn't have a Go-Live license. To try out the new SDK you can download the CTP here:-

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=28962

There is just one API addition to support this change which is an additional property available from Microsoft.Phone.Info.DeviceExtendedProperties.GetValue - "ApplicationWorkingSetLimit" which will let you know whether you are running on a device with 256MB RAM. If your app/game is sufficiently resource heavy that you don't feel it will run on such a device you can opt out so that your app/game will not be available on these lower powered devices. This is done by adding the Requirements element to your WMAppManifest.xml:-

<Requirements>
      <Requirement Name="ID_REQ_MEMORY_90" />
</Requirements>

The other main difference for these devices is there is no support for Background tasks - either Periodic or ResourceIntensive and attempting to add a background task on one of these devices will throw an InvalidOperationException - so it's important to to check the capabilities first. Because of this limitation you need to design your app such that it doesn't rely on a background task and that whatever sync/processing the task normally performs can be done when the app is running in the foreground.

Microsoft have prepared some information on optimising apps for 256MB and it is available here:-

http://msdn.microsoft.com/en-us/library/hh855081(v=vs.92).aspx

Some of the suggestions including using the built in launchers and choosers rather than running functionality such as the WebBrowser control or Bing Maps control within your app. They also suggest avoiding using the page transitions provided by the Silverlight Toolkit but don't suggest an alternative - not sure if this means these devices don't have the smooth page transitions at all or if they are suggesting that doing them from managed code is too resource intensive. You may decide to implement multiple approaches and use different methods depending on the device capabilities. Obviously the trick here is the balance between providing the best possible experience on each platform and avoiding adding too much more code to maintain.

Published Feb 27 2012, 11:49 PM by PeterFoot
Filed under:

Comments

No Comments

About PeterFoot

Peter Foot is co-author of the Microsoft Mobile Development Handbook published by Microsoft Press. Peter has been awarded the Microsoft Most Valuable Professional (MVP) accolade since 2003 for his involvement in the Microsoft .NET Compact Framework developer community. Alongside an active presence in several online forums and communities, attendance at developer conferences and involvement in shared-source projects, Peter has also written a number of technical articles and maintains an active technical blog.
Copyright © 2001-2013 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy. OrcsWeb's Windows Cloud Server Hosting