Nokia Sensor Core Beta now available

Nokia make some fine APIs for Windows Phone. And now they've just released a couple more. Their Imaging API is great, and make it really easy to add image processing to your applications. It has just graduated from Beta to a formal release.

The Sensor Core API, just released as a beta, is a very interesting development. It takes Windows Phone into a domain it hasn't been before. Up until Sensor Core it was impossible to do things like track user activity and do things like count the number of steps walked by the phone user, find out where they had been etc etc. But Sensor Core provides the stuff to do all that for you. 

From my experience Nokia libraries are well written and beautifully documented. I'm going to get hold of them and have a play. If you are into Windows Phone, you should too. 

Using a Progress Ring in Windows Phone 8.1

I'm slowly getting the hang of unified applications. Most of the time I'm having to forget how the phone does things, and pick up some Windows 8 habits. The busy indicator is a case in point. Using it is very easy, but it is different from the phone and so I thought I'd blog it here in case I forget. You can get a rather nice animated ring display like the one above by simply adding it to the XAML in your page:

<ProgressRing Name="BusyProgressRing" IsActive="False"></ProgressRing>

Then, in your program, you can just turn it on and off when you start something that might take a while to complete.

BusyProgressRing.IsActive = true;

I've written a stupidly simple unified app that lets you start and stop the ring displaying at the touch of a button. You can find it here

This form of display is used when your program is doing something that will take a while to complete, and you don't know how long it will be. I use it when I'm setting up Bluetooth connections. 

Home to a Bluetooth Printer

We spent the night in Whitby at the Dolphin Hotel. We had a lovely large room which overlooks the bridge right in the centre of the town. I took the photo from the room first thing in the morning, just before we headed down for a really nice (and huge) breakfast. If you are looking for somewhere to stay, I strongly recommend the place.

Then we headed home and I found some time to finish off the hardware for the Bluetooth printer I've been working on.  Note how it is a Bluetooth device, and I've put it in a bright yellow enclosure. And why not....

When I designed the box it seemed like a good idea to put the switch in the bottom. Of course it is actually a bit silly, as whenever you put the box down you turn it on or off. Fortunately I have some bit stick-on feet that help with this, but I'm going to have to refine the design anyway as I don't seem to have left much room to allow the actual construction of the device.....

This is the guts of the printer, just a bunch of batteries and a trusty Bluetooth adapter. I'll post full details of construction and the software later this week. 

I'm not writing any more Windows Phone applications

It's true. From now on, no more Windows Phone programs for me. Instead I'm creating universal  ones. These work on Windows 8.1 and Windows Phone 8.1 devices, so now I can target pretty much every platform, Lovely Lumia, Surface RT, Dell Venue Pro, Surface Pro, Dell big tablet etc etc, from one solution. If you get the latest version of Visual Studio (from here) you can do the same

Windows 8.1 and Windows Phone 8.1 have different display sizes and behaviours and so you need to create two user interfaces. These are managed as two separate projects in the universal solution.  However, if you are clever with your design you can put all of your business logic in the shared code and then just project the appropriate view onto the target devices. 

On the right you can see how this all fits together. I'm making a QuickPrint application that lets you send things to a little Bluetooth printer that I'm putting together. The two versions of the application each have their own MainPage and then there is a project for the shared code. In this case I'm sharing my Bluetooth manager code. 

I was very surprised (and pleased) to find that the Bluetooth manager worked on both platforms in exactly the same way. It does some fairly low level Bluetoothy things, and they just worked. 

As a Windows Phone developer moving over to the Windows 8 platform there are some differences in the way that the XAML works, but nothing that can't be solved by using Intellisense and a few searches. And at the end of the process I had something that I can think about deploying in both marketplaces. 

And of course this means it is now even easier to become a phone developer if you have already written some Windows 8 stuff, which is lovely. 

Manchester //publish event

Nice sendoff at Hull Paragon station. What you see here is famous poet (Philip Larkin) and ex-Hull University librarian bedecked in Hull Tigers colours in honour of our appearance in the FA Cup Final tomorrow.

Nice sendoff at Hull Paragon station. What you see here is famous poet (Philip Larkin) and ex-Hull University librarian bedecked in Hull Tigers colours in honour of our appearance in the FA Cup Final tomorrow.

I spent today at //publish in Manchester. The idea is that like minded folks get together and get around to publishing applications and games they've been working on for a while. I have an agenda of sorts. I wanted to get some traction on my Windows 8.1 versions of Cheese Lander and Robs Red Nose Game. But mainly I wanted to talk to Peter about Bluetooth with a view to getting my Wedding Light controller working on Windows 8.1.

There were a bunch of folks there when I arrived at MadLab. They were all working away and I settled down, exchanged a few remarks about cheese (as you do) and then got cracking too. Peter took a look at my Bluetooth code and made some suggestions which resulted in it all suddenly working. So I can now control my wedding lights from my Lovely Lumia 1520 and also my Lovely Surface Pro 2.

Next step is to make a "unified" app (one that runs on both Windows Phone and Windows 8.1) and make it available to anyone who want to control their lights (or anything else) from these devices. I've got until the 1st of June to finish it off and get it in the store if I want to stand a chance of winning a prize. Hint: You can claim a prize too if you get your application submitted before this date.  There's still time to register here

At the end of the day we had presentations of the applications that had been published during the day and winners were picked. Apologies for not noting any names, but you know who you are and a picture is worth a thousand words. Right?

And a butterfly collector (is that lapidopteral?) app earned the writer a Lumia 1520 (it's almost as if It is being pulled from Peter's hands....)

And a butterfly collector (is that lapidopteral?) app earned the writer a Lumia 1520 (it's almost as if It is being pulled from Peter's hands....)

A really impressive 3D Tetris game won the a Dell tablet

A really impressive 3D Tetris game won the a Dell tablet

Thanks so much to Microsoft for organising //publish, Peter and Pete (they are different people) for setting up the Manchester event and the folks at MadLab for making us so welcome (and putting on such delicious food at half time). 

And I even managed to sneak out at lunchtime and buy a pair of trousers..... Great stuff. 

Wedding of the Year

Number one daughter got married today. And it was lovely. Everything and everyone involved worked, ran on time, played their part to perfection and made it a properly grand occasion. If you were there (I gave the blog a plug during my "Father of the bride" speech, as you do) then thank you so much for coming. There might have been a few people on the day who were happier than me (I can certainly name two) but there can't have been very many. And so now, along with "number one daughter" and "number one son", I now have "number one son-in-law". Welcome sir.

During my speech I mentioned that on these occasions, along with quite a few others, it is best to make sure that the man makes all the truly important decisions. Number one wife and daughter dealt with all the low level details such as the groom, the venue, the date and the time, the food, the colour scheme etc etc. I was left to wrestle with the really difficult stuff, such as the type and configuration of micro-controller to put in the table decorations and how to make them all remote controlled from my phone.  Number one daughter had asked for "some coloured lights in vases". I reckoned I could do a bit better than that. 

Above you can see the system in action. The application in my phone is talking to a Bluetooth adapter in one of the lights which is then relaying commands over a 2.4 GHz connection to all the other lights, each of which can be addressed with commands to make it flicker, change colour and do a few other tricks. All the lights and the vases were 3D printed and assembled specially for the occasion. And it all worked splendidly on the day.

I'm going to write up everything and make the code available which essentially gives you two way communication between a phone application and any number of remote network sensors/controls. Making it all work was great fun and a perfect distraction from the proper aspects of the occasion. At least until the enormity of what was going on hit me as they were going through their vows.... 

Windows Phone 8.1 Cortana will change your life

So I'm driving into work this morning and as I'm sitting at the traffic lights I remember that I need to buy some cables when I get to work. So press the "Phone" button on the steering wheel and say "Remind me to buy cables when I get to work". Cortana confirms the command and then when I get to my office the phone beeps and I see this on the screen. 

This is something that will change my life. The way that it works is just transparent to me. I have to be a bit careful of phrasing, but I now have a phone that is properly useful in this context. I

If you've got a Windows 8.0 phone you are in for a treat when 8.1 comes out. I reckon it is worth registering as a Windows Phone developer just so that you can download the developer preview of Windows Phone 8.1 and start using this technology early. My next step is to investigate how I can integrate my applications into Cortana.  

Banjo Madness

AlienBanjoAttackShot.PNG

I'm getting a lot of questions about banjos from students at the moment. This is because we are in the final stretch of the assessed coursework for our programming module which involves either creating a management system for a "Banjos for Hire" shop, or creating a game where you have to use your accordion to fight of hordes of invading interstellar banjos by shooting killer notes at them.

Today I got to see some work in progress from some of the students. I saw a Windows Phone game that was pretty much ready to go to market (just needs some sound and it should go straight in the store) and a close to complete WPF implementation of the store. Great stuff. 

Publish and be Great

Most developers have them. Things that they have made, probably pretty much finished, but then other stuff came up and they never got around to shipping them.  And all it would take is a bit of effort just to get the thing out of the door and into the store. 

Publish is for these projects.  It's a worldwide event for Windows Store developers to get together and head for the finish line. It runs over the 16-17th of May and I'm nipping over to the event in Manchester to join fellow MVPs and developers in getting stuff finished. 

From my experience with Three Thing Game, Global GameJam and Hacked I know that it is amazing just how much you can get done in a short time if you just focus on a single task. Of course it also helps if you are surrounded by folks all doing the same thing, and that you get pizza and fizzy drinks (the fuel of champion developers the world over).

If you want to join us in Manchester you can sign up here. There are events planned all over the world, you can find a local event and take part here. You can even set up your own local event if you want, or just take part from the comfort and security of your own desk. 

I'm really looking forward to it. Perhaps that Windows 8 version of Cheese Lander might actually see the light of day.........

Windows Phone and Trams

Windows Phone and trams go together very well. Last week, whilst on unfamiliar territory in the Netherlands, I needed to find the way to Escher museum. Windows Phone gave me all the details very quickly and I can even pin my route to the Start menu so that it is easy to refer to. Very useful.  

And of course with the map already downloaded before we set off, I was able to navigate quite happily in spite of having no network connection for the phone. 

Windows Phone 8.1 Cortana Marketplace Tip

If you have upgraded your Windows Phone to version 8.1 (and you should if you are a Windows Phone developer) then you will have found out about Cortana. She is the Windows Phone equivalent of Siri, with one or two significant improvements on the genre. Snag is, she is only available to Windows Phone users in the USA at the moment.

The good news is that you can get Cortana goodness on your phone from anywhere in the world, just by setting your region and language to USA. The bad news is that this stops you from being able to buy things from the Windows Phone Marketplace (although you can still get updates to installed programs).

However, there is a workaround for this if you happen to have a second Windows Phone. Leave that in your home region and then use it for all your purchases and you will then be able to "re-install" them on your Cortana enabled, USA region, device. 

Update: Actually I think it might be even easier than this. Remember that you can buy applications and games for your phone via the Windows Phone website.

Monogame at TechDays

This is the audience getting ready for the presentation.&nbsp;

This is the audience getting ready for the presentation. 

Sage advice

Sage advice

I did my final presentation of TechDays this afternoon. I love working in the Netherlands. Yesterday I celebrated my arrival on stage by kicking one of the lamps and breaking the bulb, in the process fusing all the lights. This made for a rather fraught five minutes for the tech guys, who had to find and replace the fault part. Then, during both of the presentations yesterday I was continually tripping over the lights and moaning about them. (Moaning is one of the things I do best. Today I arrived to do my presentation to find this thoughtful warning on the lamp in question. And the thing is, it worked. I didn't touch the lamp once. The audience was, as usual, great. I reckon that Dutch audiences are around the best in the world (and I've seen a few). They are up for anything, and are very happy to be in on whatever joke is going around.

I was talking about MonoGame on Windows 8.1 Phone and PC. Some of the demos were a bit reluctant to work, mainly because I'm presently running two development environments (VS 2012 and VS 2013 RC2) on my trusty Surface Pro 2. These kept grabbing the wrong files and then discovering that they didn't work. But in the end everything came right. You can find the slides and all the demos here

This is a really nice part of the world. Amsterdam is great, but I reckon The Hague beats it in terms of pace of things (a bit less frantic) and a lot fewer tourists (or at least that is how it seemed to me. They even have trams that go on the grass. 

(Note that this is not a cunning drugs reference.)

Early Birds at TechDays 2014

Some of the early birds who caught my first session

Some of the early birds who caught my first session

I must admit I wasn't convinced about the plan to start the TechDays sessions at 7:45 in the morning. Particularly as to my UK body clock this meant 6:45... I wondered to myself if anyone would actually turn up. But they did. I had a very good turnout and the session turned out very well. Thanks to being such a fantastic, and wide awake, audience folks. The subject of the talk was Windows Phone 8 Bluetooth and Near Field Communications (NFC). I've put the slide deck and the sample code here. There are demos, sample code and all kinds of stuff. And around 110 slides....

In the afternoon I did my second session of the day. This was the fun hardware one. This had all kinds of scary demos, which ended up working which was nice. I had my Windows Phone devices all talking to Arduino controlled lights and stuff. You can find all the slides and demos here

At the end of the session I took a picture of the audience. Thanks for coming folks.

Software Upgrades and Theft

I'm away from home. Network connections in the hotel are a bit dodgy. I'm giving a talk at a technical conference where I'll be expected to have the brightest and latest software on display. And so of course the latest Windows Phone 8.1 release becomes available to me today.... 

Took

So it was off to Starbucks for a coffee, some quality wifi and a firmware upgrade. It took a little while, but it is a tribute to the phone team that it all went swimmingly well. All my applications, media and settings made it across the upgrade and everything is where it should be. And there are some lovely new things to play with.  

This is just outside our hotel. Very nice.

This is just outside our hotel. Very nice.

Once the upgrade was complete we headed over to the station and caught the train to The Hague. 

And somebody stole my suitcase. 

It seems that there is method behind the constant "Don't leave your luggage unattended." messages that they play at stations and airports. Because if you do it will probably be stolen. This put a bit of a downer on the day, although all the miscreant got away with was a bunch of over-sized clothes, some dirty.  All my technology was in my backpack and that never leaves my sight.  The good news is that the hotel is splendid, and while we were out looking for replacement clothes for me we found a smashing little town centre just a short walk from where we are staying.