.NET Components for Mobility

Peter Foot

Microsoft Windows Phone Development MVP
  • Windows Marketplace for Mobile 6.x to be Discontinued

    If you publish apps on the old Marketplace for Windows Mobile 6.x you should have received reminders that the service will be discontinued in two weeks. If you have been using our Mobile In The Hand product with a managed code app there are a couple of issues to be aware of. Our libraries contain the following two classes to provide programmatic access to the Marketplace client on Windows Mobile 6.x:-

    • InTheHand.Phone.Tasks.MarketplaceDetailTask
    • InTheHand.Phone.Tasks.MarketplaceLauncher

    If these are called on a device with the Marketplace client installed they will launch the client application however once the service is discontinued no application details will be accessible so this may result in a confusing experience for your users. Consider these classes obsolete as they will no longer be supported and will be removed from the next release.

    https://inthehand.uservoice.com/knowledgebase/articles/72785-windows-marketplace-for-mobile-6-x-to-be-discontin

  • 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.

  • Tasks v1.19

    The latest update to Tasks is now available in the Marketplace. This release continues the improvements to the sync experience by providing more resilience in situations where the network drops out during a sync. It also improves the reminders feature in Windows 7.5 and improves the display of reminders for tasks with very long titles.

    http://www.windowsphone.com/en-GB/apps/55fcf880-6b03-e011-9264-00237de2db9e

     

  • Follow Up from Windows Phone Camp Bristol

    A few of you who attended the Windows Phone Camp in Bristol asked about the slides and code from the Storing Data and Cloud/Networking session. I've uploaded the latest versions of these slides and the additional Sockets code project to the FTP site. All the links and resources mentioned during the day are on Pete's blog post:-

    http://mobileworld.appamundi.com/blogs/petevickers/archive/2011/11/13/links-and-resources-from-windows-phone-camps.aspx

    Happy Coding!

  • Review: Making Embedded Systems (Elecia White)

    This title takes a traditional software programmer into the world of embedded system. It covers the process of designing and implementing an embedded system from a sketch through to optimising performance and power consumption.

    As an interesting addition, at the end of each chapter, there is a potential interview question for an embedded developer position. It’s an unusual idea but is a way of tying up the topics covered in the chapter. Because the book is written for developers it applies patterns and techniques which the reader will already be familiar with and how they apply to embedded systems.

    It emphasises the need to be aware of the limited resources available and how to pare down operations to a minimum to make best use of them. It also talks about various options for input and output for a variety of peripherals and sensors.

    The book offers a useful introduction to the world of embedded development to a developer with existing C (or similar) experience. More experienced embedded developers will probably want to delve into more detail on the specific areas, but this is a great starting point.

    4/5

    Posted Jan 20 2012, 02:53 AM by PeterFoot
    Filed under: ,
  • Review: Making Embedded Systems (Elecia White)

    This title takes a traditional software programmer into the world of embedded system. It covers the process of designing and implementing an embedded system from a sketch through to optimising performance and power consumption.

    As an interesting addition, at the end of each chapter, there is a potential interview question for an embedded developer position. It’s an unusual idea but is a way of tying up the topics covered in the chapter. Because the book is written for developers it applies patterns and techniques which the reader will already be familiar with and how they apply to embedded systems.

    It emphasises the need to be aware of the limited resources available and how to pare down operations to a minimum to make best use of them. It also talks about various options for input and output for a variety of peripherals and sensors.

    The book offers a useful introduction to the world of embedded development to a developer with existing C (or similar) experience. More experienced embedded developers will probably want to delve into more detail on the specific areas, but this is a great starting point.

    4/5

    Posted Jan 19 2012, 02:53 PM by Peter Foot
    Filed under: ,
  • Windows Phone Update due shortly

    Microsoft have published details of a new update (7.10.8107.79) which adds a number of fixes to the Mango release. It fixes the issue where the on screen keyboard will randomly hide itself which I've been finding frustrating recently and also a fix for the SMS bug which could disable messaging. It also hopefully finally resolves the issue when forwarding Exchange messages where the original message body would disappear. It hasn't shown up yet but expect it over the next couple of weeks. Full details on all the updates and fixes are published here:-

    http://www.microsoft.com/windowsphone/en-us/howto/wp7/basics/update-history.aspx

  • Developer Unlock Expiry

    When you've developer unlocked your Windows Phone you can merrily deploy and debug on it and everything is great. If you've upgraded to Mango you had to run the Unlock tool again but this is fairly painless. What is not obvious is that the developer unlock has a 12 month expiry from when you first register the device and even when you subsequently use the unlock tool on the same device this never gets extended.

    So one day you'll be developing as normal and get the error "Failed to connect to device as it is developer locked. For details on developer unlock, visit http://go.microsoft.com/fwlink/?LinkId=195284.". Instictively you launch the developer unlock tool, enter your App Hub credentials and unlock the phone. This completes with no errors but you'll soon find that it hasn't helped despite the fact you entered valid credentials and your App Hub account is valid.

    The solution to this problem is to log into App Hub on the web and go to your account profile, select devices and remove the offending device from the list (here you'll see that the expiry date is shown). After doing this you can run the unlock tool again and successfully unlock the device.

    Microsoft could certainly improve this process in the future by using a more descriptive error message and also by improving the unlock tool so that when you try to unlock a device that has expired it refreshed the registration and provide 12 more months of use (just like the manual process described above does).

    Merry Christmas, and here's to a wonderful 2012 filled with Windows Phone goodness!

  • Submitting Apps to Marketplace with Background Tasks

    I've been working on an update to the Tasks application which adds in background synchronisation using the new background task support in Windows Phone 7.5. As with any app when you submit your XAP static analysis is performed on it to check, for example, that you have declared the correct capabilities based on the functionality in your app. Within a background agent you are only allow to call a subset of APIs - as you would expect you can't play sound effects or draw to the UI (with the exception of toast notifications and tile updates). Because the main app has to include a reference to the dll which provides the background task, and the functionality within the dll is used in both the background task and the main app it made sense to move all of the logic into the background dll. This meant including a number of third-party references. I was very careful to ensure that nowhere in the background task was any restricted API called and it worked perfectly in testing.

    The first problem is that upon submitting the static anaylsis looks at all of the referenced dlls and sees that they contain APIs not permitted in a background task and blocks the XAP. One of the culprits was InTheHand.Phone.dll (Part of Mobile In The Hand) because it provides a mixture of helper classes for logic and for UI. As I've been working on the 7.1 version in tandem I've now split this into two assemblies for Windows Phone 7.1 SDK projects. This means we can continue to use InTheHand.Phone in background tasks and add a reference to the second assembly in the main application only.

    The second problem is that code within the sync logic calls ScheduledActionService.Add which is disallowed within a background task. This API is used within Tasks to add system-wide reminders (Another new feature for this version) for new task items. The code also has the ability to update and delete reminders based on modified or deleted tasks but these do not seem to have been flagged up as errors. This is a pain because it means that if the device syncs a new task with a reminder set to show before you next open the foreground app we won't have had a chance to register it.

    The other issue with the NeutralResourceLanguage is an issue with projects originally created with an older version of the development tools. You can add this setting from the projects properties, Application tab and click "Assembly Information...".

    This has been an interesting learning experience and shows that the validation picks up not just APIs used in the background agent code-path but also in referenced assemblies.

  • Showing Mango Features on Marketplace

    The Windows Phone team have posted to their blog about application updates with a couple of useful points:-

    From October you will again be able to publish updates to your 7.0 apps independently from 7.5 (previously once you had published a Mango update your 7.0 app would be locked). It does mean potentially being in limbo for a month but at least you are not stuck completely with no way of updating a 7.0 app. This is important as it will take some time before many users will have the opportunity of upgrading to Mango.

    When submitting apps there is only one description for both versions of your app so you must describe which features are for Mango only. For the purposes of Screenshots there is now an officially accepted overlay which can be used to indicate Mango-only functionality. You can download a ZIP containing the overlay and examples here:-

    http://create.msdn.com/downloads/?id=882&filename=Marketplace_7.5_Badges.zip

    The full blog post is here:-

    http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/09/20/submit-windows-phone-7-5-apps-today-update-7-0-apps-in-october.aspx?utm_source=twitterfeed&utm_medium=twitter

  • Showing Mango Features on Marketplace

    The Windows Phone team have posted to their blog about application updates with a couple of useful points:-

    From October you will again be able to publish updates to your 7.0 apps independently from 7.5 (previously once you had published a Mango update your 7.0 app would be locked). It does mean potentially being in limbo for a month but at least you are not stuck completely with no way of updating a 7.0 app. This is important as it will take some time before many users will have the opportunity of upgrading to Mango.

    When submitting apps there is only one description for both versions of your app so you must describe which features are for Mango only. For the purposes of Screenshots there is now an officially accepted overlay which can be used to indicate Mango-only functionality. You can download a ZIP containing the overlay and examples here:-

    http://create.msdn.com/downloads/?id=882&filename=Marketplace_7.5_Badges.zip

    The full blog post is here:-

    http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/09/20/submit-windows-phone-7-5-apps-today-update-7-0-apps-in-october.aspx?utm_source=twitterfeed&utm_medium=twitter

  • Working with Marketplace Exported Reports

    When Microsoft refreshed the Windows Phone developer portal in advance of the Mango refresh they added various improvements to reporting, an important one being export to file (XLSX). When you open the exported payout detail reports in Excel and enable editing you'll see a number of warnings against a couple of columns. This is because the data is formatted as text but Excel recognises that the contents are numbers. In order to use these values in formulas or graphs you'll need to convert them to numerical values.

    The easiest way I found to do this was to select an empty cell and Copy it, then select the entire columns of "Units Sold" and "Royalty", right click and select "Paste Special". From the popup select "Add" as the operation and click "Ok". Now all your number columns are really numbers (you'll see the formatting change to right alignment).

  • Need a Windows Phone developer handset?

    Are you a Windows Phone 7 developer in New Zealand? Are you in need of a real Windows Phone device to test and debug your apps on? If so I have a spare Samsung developer handset which is going free to a good home. Shipping is $5 to anywhere in New Zealand. I could ship it internationally but the cost would be higher. Contact me if you are interested. I have only one and it’s first come-first served!

    Update - The phone has now been claimed

     

  • Finalists Announced for the Imagine Cup 2011

    I recently had the fun experience of working in the judging team for the Imagine Cup XBox/Windows Game Design competition. This was one of the many tracks of the Imagine Cup competition concentrating on games for Windows and XNA written by teams of students. The quality and variety of the submitted games was awesome and I’m pleased to see one of the titles I judged made it to the finals. You can read all about the final five games in this track here:-

    http://blogs.msdn.com/b/andrewparsons/archive/2011/05/24/meet-the-finalists-xbox-windows.aspx

     

    Posted May 25 2011, 05:37 PM by PeterFoot
    Filed under:
  • Quick Look at the Mango Developer Tools

    The Mango developer tools require Visual Studio 2010 and Service Pack 1. The package includes a Mango emulator image and new project templates. The tools allow you to work with (and create new) projects for Windows Phone 7.0 as well as 7.1 (which is how the tools describe the Mango release. Previous rumours had suggested 7.5. The full list of 7.1 project types is below.

    project types

    There are no visible difference to the developer tools, you have the same XAML editor and code editors as before and the same Toolbox items.

    New Functionality in Microsoft.Phone

    Microsoft.Devices namespace now holds classes for working directly with the camera, allowing you to put a live viewfinder in your app and access and manipulate the raw data.

    Microsoft.Phone contains a base BackgroundAgent class and the BackgroundAudio and BackgroundTransfer namespaces contain specific implementations for audio and file transfers.

    Microsoft.Phone.Info adds new properties and a new way of accessing them. Rather than the GetValue/TryGetValue approach there is a DeviceStatus class with strongly typed properties. The new properties are:-

    • IsKeyboardDeployed (for devices with sliding keyboards)
    • IsKeyboardPresent
    • PowerSource (Battery or External)

    There are events for PowerSource and IsKeyboardDeployed so you can monitor when these change.

    Microsoft.Phone.Net.NetworkInformation (short and snappy!) exposes a lot more information about network connectivity. DeviceNetworkInformation exposes not just current network availability but also whether Cellular Data or Wifi are enabled. In the case of Cellular Data you can determine if the phone is roaming. This method also exposes the ability to dom a DNS lookup for a server. Via NetworkInterfaceList you can get a full list of all the network interfaces and their characteristics. Extension methods are provided for WebRequest and Socket classes so that you can specify which network you want them to use.

    Microsoft.Phone.Notification contains some small improvements to the HttpNotificationChannel functionality. You can now query the connection status and monitor when it changes.

    Microsoft.Phone.Scheduler contains classes for scheduled actions, either background tasks, timed alarms or system-wide reminders.

    Microsoft.Phone.Shell adds improvements for tiles and the system tray. For tiles you can modify data locally without a round-trip to the notification server. You can also create secondary tiles for functionality within your application. The SystemTray finally lets you change the background color and also allows you to expose progress text or a progress bar in the system tray as the built-in applications currently can.

    Microsoft.Phone.Tasks contains some new Launchers/Choosers:-

    • AddressChooserTask – Pick a mailing address from your contacts
    • BingMapsDirectionsTask – Get directions to a specific location
    • BingMapsTask – Center a map on a specific point
    • GameInviteTask – Start a multiplayer game
    • SaveRingtoneTask – Allow a user to save an audio file you provide to their ringtones on the phone

     

    Microsoft.Phone.UserData contains classes to access (read-only) Contact and Calendar data on the phone.

    Of course this is merely scratching the surface. These improvements (especially features like background tasks) open up whole new possible features in our apps!

    Download the tools now : http://www.microsoft.com/downloads/en/details.aspx?FamilyID=77586864-ab15-40e1-bc38-713a95a56a05

     

More Posts Next page »
Copyright © 2001-2012 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy. OrcsWeb's Windows Cloud Server Hosting