A little warning about the hacked Windows Phone 7 image

I know that I possibly shouldn’t say this, but I downloaded the hacked WP7 emulator image and started using that while developing. Why? Well, I wanted to try out some of the OS integration that wouldn’t be possible with the regular emulator. So I did it…I admit it…

And it is kind of cool to be able to see more of the phone functionality in the emulator…even if I don’t have a touch screen. And to be honest, the interface gets a little clunky compared to the real thing with a touch interface when using a mouse…

But do remember that it is NOT the original image. So even if it looks as though it is just an unlocked version of the original image, it is actually a bit different. I haven’t found a lot of things that are different, but push notifications are unfortunately farked on the hacked version. It doesn’t throw an exception or anything. It just swallows the request for a new channel Uri.

I’m not sure if it is only me, or if it is like this for everyone running the hacked version, but it can be a thing to keep in mind if things aren’t working as they should…

Having that said, I probably should also mention that my computer has issues loading up the original emulator as well. It is VERY slow to start. Or rather, it starts quickly, but it takes ages for VS to deploy to it the first time. I think it might be due to some hardware issues on my machine or something, because I am not seeing the same issue on my office computer.

So I assume that this could possibly have an effect on the hacked emulator…but I haven’t been able to confirm this as I am not using the hacked version at the office…

Accessing Azure Development Storage from Silverlight

I have recently worked on several projects that have been built to utilize the Microsoft cloud platform called Azure. Azure offers a lot of really interesting benefits, and especially when it comes to being elastic. You can basically throw however much data you want at it, and as long as you are willing to pay for it, it will handle it. It doesn’t matter if you throw data at it that needs to be computed, or if you throw vast amounts of data that needs to be stored. Azure will handle it for you.

On top of that, it is really easy to build for. There isn’t really a whole lot to learn before one can get up and running in the cloud. Microsoft even offers a sweet SDK that gives you access to the cloud based services locally on your machine. It offers you the ability to deploy your webroles (web applications) straight to a local “cloud” and debug it. So you don’t even need to have an Azure account to starting to work with it.

More...

Windows Phone 7 InputScope in Visual Studio and Blend

Lately I have been working a bit on a couple of Windows Phone 7 apps, and I found a couple of interesting things along the way. I am going to try to blog more frequently soon, and try to cover as much of the interesting stuff as I can find. But it will have to wait until after TechEd New Zealand. But if you happen to be going to TechEd Australia or New Zealand, don’t forget to come to one of my talks and say hi.

Anyhow, the funky problem I am going to write about today is around a feature called InputScopes. On the phone, you can configure your TextBoxes to use different InputScopes. The InputScope defines which of the different software keyboards to use when writing in the TextBox. This is a really cool feature as it helps the user to write the type of info he/she is supposed to provide. It can be things like numbers or currency or chat. Each InputScope results in a different keyboard. Or at least some of them do. There seems to be more InputScopes than cool keyboards at the moment though…

More...

Windows Phone 7 Beta tools installation problem

A wee while back, I installed the new WP7 beta tools on my machine. I then started to rewrite the code for my push notification stuff to use the new beta APIs. And everything went fine until I pressed F5 to try and run it. At that point, it spewed out an exception saying

"Connection failed because of invalid command line arguments"

Apparently, I wasn’t alone to have this problem. A quick Google came up with several forum threads and interesting potential solutions.

The problem only arises if you had the previous phone tools installed and the reason is that he emulator creates a directory to store information in. Unfortunately, this directory isn’t removed when the old tools are removed. The good thing is that removing it fixes the issue. So if you run into the error message above, go to %LocalAppData%/Microsoft/ and delete the Phone Tools directory. Then restart the emulator, and it should be running nicely…

Code for the SLAMD session tonight

Tonight, I presented a talk about MVVM “in the real world” at the Silverlight and Mobile Developer user group on Wellington.

For those of you who were there, I am sorry that it wasn’t better organized. I just ended up with way too much work the last 2 weeks, so I didn’t have enough time to structure it all enough. I decided that it was more important to get the code built than to have a  lot of PowerPoint slides.

As I did promise, I you can download the code below and I have also added the IDispatchService that I talked about as well. It will give you the ability to marshal execution back to the UI thread from a ViewModel. Just call IDispatchService.BeginInvoke() and pass in a lambda expression or a method to execute on the UI thread.

For those of you who weren’t at the user group, or were there and thought that what I said was completely impossible to understand, I just want to explain what is in the download.

More...

Windows Phone 7 Push Notifications Revisited

A couple of weeks ago…ehh…well…let’s at least call it a couple of weeks ago (it might have been longer to be honest) I posted a blog post about using push notification on the Windows Phone 7 platform. It included more or less everything you needed to start sending push notifications on the pre-beta version of the platform.

However, about a week ago (once again…+- a couple of days) Microsoft released the new beta version of the developer tools as well as the emulator. And I assume they also pushed I to the lucky bastards that already have phones.

In this new beta, they have changed the API for the notifications, and hence destroyed my previous code. So I have updated my sample to use the new tools and the new APIs. So here I go again…

More...

Using Windows Phone 7 Push Notifications

Windows Phone 7 is still not released, and the APIs, SDK, emulator and so on is till far from complete. Having said that, people are still getting revved up about the platform and have already started to develop on it. I think this is cool, and makes me believe that there will be some really good apps on the market place already on the launch day. Unfortunately, I have been too busy to get too down a dirty with it. I definitely hope to change this, and have decided to build a game. Hopefully it will be complete by launch and I can sell 2 or 3 copies.

But, to be honest, I still feel that the SDK and APIs are changing a bit too much for me to get REALLY excited about it. I really hope that there is a new refresh on the way soon. Cause at the present, I find that there are just too many unknown things that make the development hard. You never know if the issue you are experiencing is due to you doing something wrong or due to a bug in the OS. And if it is a bug in the OS, you don’t really know when or how it will be fixed. And I really don’t want to spend my time working around things now, just to end up with weird an unnecessary workarounds in the code when the final version is released. Having said that, it still doesn’t stop you from playing around with the platform. I can still build most of my game logic and even test it in the browser based version of Silverlight while I wait for the next refresh. One feature that I wanted to try out straight away however is the push notification. Why? Well…let’s just say that I have my reasons…

More...

I got to leave my mark on TechEd US

As you probably know, TechEd US has just passed. I didn’t get to go (like always), but I did get to make my mark on the conference. I got to build one of the apps that Microsoft demoed on stage. I have actually built a bunch of demo apps for Microsoft and their conferences the last year. At some point, I will actually try to find them at some point a post some videos of them here. But they involve a CRM demo with a phone company, a SharePoint demo with a racing team and some other bits and pieces. Anyhow…this year my demo was a Word add-in, and my personal opinion about this project, before it got started, was that it sucked. I I’m not very fond of building Word add-ins as you might have guessed.

More...

Windows Phone 7 Training

The day before yesterday I was part of a Windows Phone 7 training day here in Wellington, New Zealand. Most of the day was presented by Nigel Parker, Web Development Advisor for Microsoft New Zealand, but I got to present some code demos for the attending developers. At the training, I promised to upload my sample code, so I did. But I also added some of my thoughts after the event. Sorry…

More...

Cool INotifyPropertyChanged implementation

While working on a little MVVM thingy the other day, I ran into a sweet little piece of code that I wanted to share. I have seen several version of this around the web, but this is where I found this particular version. The piece of code gets rid of the ugly part of the INotifyPropertyChanged interface. The part where you use strings to identify what property has changed. I understand that that is how you have to do it, but it feels messy. A common solution is to add constants to hold the strings, but that is not a very much better solution. it is still messy. So how can we handle it in a safe way? Well…one idea would be to do it like this…

More...