Sunday, July 21, 2013

Things I did at #HackedIO

I've spent this weekend at the O2 in London attending http://hacked.io/. It is almost certainly the largest hack event I've ever been to at 500 attendees and had the themes of "Learn, Build, Share".



Anyway, here's what I got up to:
  • Hacked a project together. It's a WP8 app that makes a light show with Philips Hue bulbs based on currently playing music and use of data from Nokia Music to get the metadata to base the light show on. [LEARN, BUILD]
  • Helped someone with an issue about Voice Commands. I hadn't used them myself before. [LEARN, SHARE]
  • Wrote a blog post about what I learned about using (and debugging issues with) Voice Commands. [SHARE]
  • Wrote a couple of NuGet packages (1, 2) to address gaps in the WP8 SDK [BUILD]
  • Learnt about building screencasts with Camtasia Studio but didn't have a microphone with me so that ruled out trying to make one. [LEARN]
  • Blogged about them instead [SHARE]
  • Read a book, about copywriting. (This was a bit of a, semi-random, diversion at my most exhausted.) [LEARN]
  • Helped with various #WPDev related queries, including unlocking dev devices. [SHARE]
  • Made it through the night with no sleep, thanks to lots of sugary food, sugar and caffeine laced drinks, and lots of loud music. Mostly from the best DJ in the world!
  • Submitted a pull request to the Nokia Music API client with some added functionality. [BUILD, SHARE]
  • Made the code for my hack public. [SHARE]
  • Had some free time (somehow!) so wrote another blog post [SHARE]
  • Helped some more people with their WP8 app [SHARE]
  • Wrote another random blog post. [SHARE]


Time for judging, presentations and lunch now. :D

It's been a great event!

Oh year, there were some WiFi issues early on but they were addressed by the excellent organising team. Much love and respect to them for an amazing job when everyone was getting stressed and frustrated about the issue. :)

Soon to sleep...



Should you create a wide tile for your app?

Let me start by saying that by reading this you've already wasted too much time thinking about this question.

In theory it's a simple decision.
If you have dynamic content that it would be useful to display on a wide live tile then you should include one.
If you don't then you shouldn't.

i.e. Don't include a wide tile if it's just a static logo.

So why even discuss this?


Well, most of the challenges on DVLUP require inclusion of all three tile sizes.
In making this requirement they're saying to add functionality regardless of whether or not it makes sense for an app.
You may object and I think you'd be right. Microsoft agree (Sorry, I can't remember which of these videos it's in. But if you haven't watched them they're all good.)

You shouldn't add unnecessary functionality or features just for the sake of it.

But here's the catch, and the idea behind my opening paragraph.
If you care about the DVLUP challenge just add the wide tile. Ok, so no-one is ever going to pin your app with it but it will only take you seconds to create the tile image (because you'll just be creating a different size version of an asset you already have).
But won't that be a waste of time?
Yes, but you've already wasted more time thinking about whether you should do it than it will take to make the tile.
Use your time wisely. Build great apps with awesome, useful features. Don't waste your time discussing things that don't really matter.


Just include the tiles if you want the XP. But feel free to know that you know better than the person who sets the DVLUP challenges. ;)




Linking to Twitter from within your WP8 app

<TrivialAndRantyPostFeelFreeToSkip />

Whether it directly relates to the content of an app or just from an about page, lots of apps contain links to Twitter that are opened in the web browser (IE).

Unfortunately, lots of apps do this wrong!

"Wrong? Really? What do you mean?" - I hear you ask.
Well, they don't do it in the quickest, simplest, and cheapest (in terms of network data costs) way.

They'll do it in, what I presume they think to be, the most obvious way. They'll open a Uri like this:
http://twitter.com/myreallyawesomeapp
"What's wrong with that?" - I hear you now ask.
Well, just type that (or, preferably, a valid username) in the browser on your phone and see.
Did you do it? Go on. I'll wait. It won't take long.

So, what happened?

That's right, it redirected.
It redirected to:
https://mobile.twitter.com/myreallyawesomeapp
There are two differences:
  1. It's changed to a different domain. (Notice the "mobile." bit before "twitter.com")
  2. It's now going over a secure (SSL) connection. (Notice the schema is now "https")

Most importantly, that change took time and an extra web request.
This all means that, unless they were on a very quick connection, the person using the app had to wait for this to happen. They were there waiting, staring at the screen while it was busy with unnecessary work. And all for the sake of typing seven characters.
I don't consider apps that force their users to wait unnecessarily to be providing the best experience possible.
#JustSaying

Triviality over. Normal service will resume soon. :)




Configuring your WP8 app to indicate that it wants or requires more memory.

A few weeks ago I created some nuget packages to make it easier to work with the WMAppManifestFile, so you don't have to manually edit it.

Since then I've realized that to indicate that you want an app to use more memory if available or to require that your app must have more memory to run (and therefore can't run on low memory devices) also requires manually editing the WMAppManifest.xml file.

So, as you may have guessed, I've built some nuget packages that can set this up for you.

To indicate that your app wants to use more memory, you can update the manifest to indicate this, search for "WMAppManfest-Extended-Memory" or use:
PM> Install-Package WMAM-FCEM

Alternatively, if you want to indicate that your app should only run on devices with higher memory levels, you can update the manifest to indicate this, search for "WMAppManfest-Higher-Memory" or use:
PM> Install-Package WMAM-RM300


As with my other packges which manipulate the WMAppManifest.xml file, the changes that are made aren't undone when you uninstall so you can (I recommend) uninstall the packages straight after you've installed it.
You can also find these packages by searching for "WMAppManifest" in the package manager.

Read more about memory limits on Windows Phone 8 at http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj681682(v=vs.105).aspx

If you use these packages or have any feedback, I'd love to hear it.





Saturday, July 20, 2013

Some notes on using Voice Commands in a WP8 app

Earlier this evening I was asked to help someone with a problem they were having getting VoiceCommands to work in their Windows Phone 8 app.

As this is a feature I had yet to implement in an app myself, but is one I'm planning for a future app, I did some investigation...

In no particular order, here are some points of interest from my investigation, and from helping them debug their app:

  • You must register the voice command file (using VoiceCommandService.InstallCommandSetsFromFileAsync) - It's not enough just to include the VCD/XML file in the project.
  • You must include the ID_CAP_SPEECH_RECOGNITION, ID_CAP_MICROPHONE, and ID_CAP_NETWORKING capabilities. - Otherwise you'll get an AccessException when you try and register the file.
  • CommandSets are culturally sensitive. So, if you specify the language of the commandset as "en-US", it won't work on a phone with speech set to "English (United Kingdon)".  You can, however, include multiple commandsets in a file and you can use a culturally neutral language.
  • You can sepcify wildcards in the ListenFor section by using "{*}" and these will match anything. Unfortunately, the recongniser won't tell you what the user said though. YOu just get a ellipse in the response. (Some spelunking through some old mailing lists shows that this was escalated to Microsoft, by the developers behind some big apps, when the SDK was still very new so hopefully we'll be able to retrieve (be told) everything that was spoken in a future version.)

I hope this helps someone else save some time in future . :)




Wednesday, July 10, 2013

What iOS7 could mean for Windows Phone

Sorry to the Microsoft fan boys out there but this isn't going to be a post about how iOS7 has "copied" Windows Phone.

iOS7 has followed a trend that has been popular across many platforms.

The important point I want to focus on is that iOS7 looks dramatically different from all the versions of iOS that have gone before.  Head over to http://www.apple.com/ios/ios7/ if you've not had a good look yet.



The difference matters because many apps, brands and companies have taken all their branding cues from earlier versions of iOS.

If you're a Windows Phone or Android user (or developer) you'll have no doubt noticed the number of apps that were first created on iPhone and then ported to other platforms but kept the original, iOS appropriate visuals and styling.

I predominantly work on creating Windows Phone apps that already exist on other platforms. (It's typically only apps that are successful on other platforms that can afford to pay to get their app ported.) One thing I hear a lot as part of my work is that the company behind the app sees the way the app looks on iOS as part of their branding. They don't necessarily says this directly but that's the underlying idea when they say that they want it to look like it does on iOS.

Some time ago, when they created their app they, rightly, wanted it to look like it belonged on the device and OS it was running on. No doubt, for most companies this was a new experience and probably not straight forward as they adjusted to how their traditional branding and visual identity was represented on this new small screen.
After such a complex and time consuming process I suspect one of two things happened.

1. They got so used to seeing their iOS app they lost sight of what really composed their original brand identity and what they regularly saw took over.
or
2. They didn't want to go through the hassle of adjusting their visuals to each new platform. They've done that already. After all, aren't all mobile platforms the same.

This is where iOS7 raises an interesting scenario. If there are lots of apps/companies/brands who take their app design influence from iOS, what are they going to do with this update?
If they leave everything looking like it did on iOS6, then when run on an iOS7 device it's likely going to stick out like a sore thumb.
Similarly, if they update their app(s) to solely adopt the new iOS7 styling then it will stick out, for the wrong reasons, when run on devices still running iOS6.

As not all devices will (or can) be updated to run iOS7 the only option for companies wanting to continue to support all iOS users, regardless of which version of the OS they have, the only option is to have an app that adopts its display based on the OS it's running on or to have different versions of the app(s) for each platform.

The important point here isn't that they have to deal with further fragmentation; it's that people are going to be forced to think about making their visuals and styling appropriate to the platform they're running on as part of wanting to make a great user experience.
My hope is that, once companies are forced to look at providing a platform specific visual experiences across the different versions of iOS, they will also make appropriate considerations for other platforms too. The ultimate result of this should be a better experience for users. And, if users are getting a better, tailored experience then we all win.



Wednesday, July 03, 2013

Slides from my talks at #MobDevCon

Today I gave two talks at MobDevCon (Norfolk's first mobile developer conference).

The first was about tips for developers who are (or are thinking about) porting their mobile apps to Windows Phone 8.

The second was looking at the myriad opportunities available for monetizing mobile applications and intended to encourage developers to think beyond just charging the minimum the app store or marketplace allows or making it free and sticking some generic banner ads on the page.

Enjoy.

They suffer the usual distortion you get when converting to slideshare but hopefully they're still readable for you. ;)




Tuesday, July 02, 2013

Windows Phone 8 development documentation and training links


For reference, here are a collection of links to Windows Phone 8 development documentation and training materials.

Development docs


Develop: http://aka.ms/wp8devdoc
Design: http://aka.ms/wp8devdesign
Testing: http://aka.ms/wp8testing
Publish: http://aka.ms/wp8publishing
Samples: http://aka.ms/wp8samples


Training


Absolute Beginners: http://wpdev.ms/beginvids
Jump Start: http://aka.ms/wp8js
Design boot camp: http://aka.ms/wp8designbootcamp
Training Kit: http://aka.ms/wp8hol