A few months ago, I released a simple task management app for Windows 8.1 to the Windows store. Since then, I’ve updated it a few times as I’ve had new ideas or needed to resolve some issues. However, what I really wanted to do was to create a Windows Phone version, and so I did. Today it went live in the Phone Store.
To get it onto the phone store, I updated the original Windows 8.1 version to be a universal Windows app (which was a piece of cake), and then I set about making a phone-friendly version. Here’s what that entailed.
Actually updating the Visual Studio solution to create a universal version was the work of one menu option. This created a new project in my solution, and a third new branch for shared data. I added the project to my source control system, and that was that. Easy.
Data model, file handling etc.
This was the simplest part of the entire process. I had to do absolutely nothing to change the way the data (all the tasks) was stored internally, and then serialized for saving and loading. Not a thing. All the code I had written for manipulating the tasks was the same. I could even share the same methods between my two projects, so that any changes or updates I made would be automatically reflected. I had one issue, that was something that I already covered in a previous posting. Specifically, when saving data you must remember to use an async method and ensure that you are wrapping it in a deferral to make sure it gets completed before the app is terminated.
The wonderful thing was that the first time I ran the app on the phone, it automatically picked up the tasks I had entered on my desktop computer. More about this later.
User Interface changes
I did however want to change a few things about my user interface, so I created a specific MainPage.XAML file for the phone version, and its related code-behind page. I tried to consider which functions would be the most important to a user (adding a new task, editing a task) and so I made those commands front-and-center with single taps. Other commands I added to a pop-up menu which appears when you tap-and-hold on a task, or tap one of the buttons in the app bar. This was a simplification of the desktop/tablet version, which was more about dragging-and-dropping or using the mouse to select a task, and then applying an action.
This didn’t really take too long to code: all I was really doing was changing the event handlers I was working with, and trying them into the same task management methods I had already written. The important part was to use the app for a few days, and judge whether I’d made the right call between key functions and lesser-used functions. My big concern was how discoverable would the tap-and-hold pop-up menu be, so I err’d on the side of paranoia and made the default text for each task a little reminder in its own right.
As you can see, the desktop/tablet version has giant buttons for switching to different days (rather than the app bar). Also, the tasks in this version support a single tap to highlight them, and then the actions in the app bar became active. This version also supported working in landscape or portrait mode, while the phone is limited to portrait only. The phone version also did away with the day and time display, but it went full-screen to allow signal strength, battery life etc. to be shown.
Publishing the phone version to the store was straightforward. When I went to the Windows Phone Dev Portal Dashboard, and selected the name of the app, a warning popped up, asking something to the effect of was I sure I wanted to link this phone app with my existing desktop/tablet app. When apps are linked, it means buying one also buys the other (which is fine by me, as both a free) but also that they can share data and in-app purchases. The latter didn’t bother me either, but the former is actually a real bonus. As I serialize and save the data which contains the task to the roaming directory by default, this means that the tasks are automatically synced between the phone version and desktop version. And this is why when I first installed and ran the version on my phone, the tasks I had created in the desktop app appeared. Magic, I tells you, magic.
Obviously not all apps can be as easily converted to universal, but in this case, the task was surprisingly simple. If you have an app which is heavily XAML based, or based on HTML/WinJS, you will probably find that it will just work if you create a new version. Sure, the user interface will be broken in a dozen ways, but the app will essentially work, and you can focus on best taking advantage of the new form factor. This is impressive stuff you gotta agree. Now, go make some more apps!