Like many people, I was glad to hear in February that there was finally a WP7 app for Skype (beta version). Although I don't personally have much need to use Skype, I appreciate just how powerful it can be for both cheap international calls and video calling.
I downloaded the Skype Beta from the link provided on their blog and gave it a run on my HTC Mozart. It looked ok, I could certainly see the few contacts I had on Skype, but I didn't really give it a second thought. That was until I was in Thailand recently and again thought how great cheap (free) video calling would be for communicating with friends and family while on vacation (or living as an expat). My 4-year old son is pretty good on the phone, but I knew that if he could see daddy while talking, the conversation would be far more free-flowing.
First-things-first, most of you will know that there are no Windows Phones out there with front facing cameras, so it's a bit of guesswork figuring out if your face is actually in the frame when placing a video call. I managed to get it working ok, but eventually I just connected my laptop to the phone's Wi-Fi and used a regular webcam, which made it a whole lot easier. Perhaps the fatal flaw with the current Beta version is that it does not work in the background, so even if you have opened the app and signed in as soon as you go back to the start screen or open another app, it is game over.
Once I got home I was testing the app a little further and I was even more horrified. I started the Skype app on my Nokia Lumia 800 and logged in, making sure it had time to get all the latest info before pressing the Windows key to go back to the start screen. I then Skype called myself from my old HTC Mozart. As expected the Lumia 800 did nothing, even the Skype page on the Windows Phone Marketplace makes it clear that the app doesn't run in the background. What annoyed me the most was that my iPad2, which was being used by my wife to watch some movie trailers on YouTube, got the call!
Where is the sense in all this? Why does Skype, a company bought by Microsoft in 2011 for a bucket of cash (US$8.5 Billion), take so long to deliver what is effectively a test app for Windows Phone? I mean, how serious is their commitment to Windows Phone? Do they expect you to have the app open waiting for a call? Maybe the execs at MS and Skype thought it quite reasonable to expect users to call, text or tweet each other to let them know to open the app. Maybe a text along the lines of "Hi honey, about to Skype you to remember to buy milk, can you please start the Skype app".
By the way, I love my Windows Phone and would dearly love to see the whole ecosystem evolve. It offers so much already built-in (baked-in) in terms of email, calendar and social networking that there's not a lot more I could want. One of my favourite things (and certainly my best argument when chatting at work with the iPhone/Android mob) is that I have downloaded hardly any apps because the OS provides so much already. Skype is currently not part of that great experience and it needs to be – really, really soon – if Windows Phone is to have a chance. Skype, if you need a hand let me know (jobs at ezidata.com.au) – I would be only too happy to assist!
We recently spent a week on vacation in Chiang Mai, Thailand. My wife had a couple of university assignments to submit and, as we wanted to use Skype as much as possible to keep in contact with family back home, having an internet connection was important.
Internet access at our hotel was charged at a ridiculous rate (80THB for 30-minutes) so as soon as we got to Chiang Mai we went to the mall, attached to the hotel and bought a DTAC ‘Happy Tourist’ SIM card. Having researched the Happy website, this looked like a good match for our needs as it had an option to get a full week of 3G internet for 199THB. The SIM comes in two varieties, 49THB or 99THB, the later with more included calls. The only problem was that the retailer sold us the 49THB SIM for 99THB, which I didn’t realise until we got back to the room and activated the card.
I put the SIM card into my old HTC Mozart, almost instantly got messages from Happy that our service was active and tried to connect to the internet. Although the phone had service, I couldn’t get on the internet so I called the service number and finally spoke to a customer service rep who advised me that I needed to restart the phone - damn why didn’t I think of that (maybe because I have never needed to restart the phone for anything else).
The Happy Tourist SIM gives you the first day’s internet connection for free, so we tested sharing the connection between my phone and laptop and it was working smoothly. We then milked our free internet for all that it was worth.
Internet Sharing was rolled out to Windows Phone as part of the Mango update and you’ll find the option in the Settings menu. I believe it must also be supported by your carrier. When you enable Internet Sharing, the phone creates a SSID for the Wi-Fi service and provides you with a password that you will need to use to connect from other devices.
Connection speeds here in Chiang Mai, even sharing the connection over Wi-Fi seem good. From the laptop tethered to my HTC www.speedtest.net said I was getting .98 Mbps down/.78Mbps up when connecting to Thailand-based servers. Connecting to servers in the USA, speedtest.adslthailand.com showed I was getting .78Mbps down/ .51Mbps up.
One disappointment with the Happy website is that you can’t top-up your account on the web using a credit card, so you need to purchase a top-up card from one of the retailers, such as 7-11.
You also appear to have to keep credit on your phone otherwise you lose your service. Even though we had already purchased the 7-day internet package, our phone balance hit 0 on the last day and no matter how hard I tried, I could not connect to the internet. As soon as I put another 100THB credit on the phone, the internet was up and running again.
As mentioned in the previous post I have just received a Nokia Lumia 800 and am now able to test out some of the great Nokia WP7 apps, including Nokia Drive. Ever since the rumours and leaked screenshots of the WP7 powered Nokia appeared on the web I have wanted to take the Nokia Drive app out for a spin. Like many people, I don't really need a dedicated GPS/navigation device like a Navman very often as I drive the same route to work every day, but it certainly is nice to have.
Having turn-by-turn, voice navigation really did help when I was on a family vacation in the USA recently and there are times when I do venture outside my comfort zone in Brisbane, so getting accurate and easy-to-use information is important. With Nokia Drive I seem to get the best of both worlds. I don't have a dedicated device sitting there waiting for the few times I need it, but I do get a good navigation system, with all the features I need, available on my ever present smartphone.
First Test
When you first start Nokia Drive, you will want to be connected to the web via a WIFI connection, as it will download maps relevant to your geographical location. When I selected Australia for the map location, the app told me I needed to download 200MB of data – that's a fair chunk of my monthly data limit on the phone.
Once downloaded, the app had no problem showing my current location on the map in a very short period of time (less than 20 seconds). Finding my destination did prove a little problematic though as the address search did not return any values for the street address I entered. I have seen this in the past when working on TrafficMATE. The Bing Map API and geocoding seems to be very strict about how you enter your address. I live in a Circuit, which is often abbreviated Cct. Nokia Drive found no results for both Circuit and Cct, but did find a match for Cirt – an abbreviation I have never seen used.
I used Nokia Drive to guide me home on my regular commute, which of course I knew all too well. I thought it would be interesting to see how well it preformed. The app performed its' task as expected, giving ample instruction about when and where you needed to go. It even appeared to give lane-assistance, telling me to "continue-right" when I was continuing on through an interchange where the left lane exited.
Of course having your GPS/navigation system sitting on the seat next to you is of limited use, so to get the most of the system you will need to put your Lumia in a cradle, but it certainly did everything I expected.
Final Thought
Ideally Nokia Drive would be integrated with other parts of the WP7 operating system so that you could get directions and start the app directly from the relevant areas. This would certainly speed up entering your destination and really does seem like a logical extension of the current 'map home address' feature available from the People Hub.
Today I finally got my hands on the much hyped Nokia Lumia 800. I had been very tempted to jump on a plane and head to London when these devices were first launched in Europe and I can say that it has been worth the wait. It makes my poor old HTC Mozart look and feel like a dinosaur.
The Nokia Lumia 800 came as a result of a recent completion Microsoft and Nokia ran where the first 50 developers to publish 3-4 new apps would get one of the Nokias (Lumia 710 for 3 apps and the 800 for 4 apps). While the 710 looked great too, I was keen to get my hands on the 800, so even though it meant quite a bit more work, I eventually got all four apps submitted and approved on the Marketplace.
First Thoughts
Wow this is solid!
Having read about the Lumia 800's solid polymer body (plastic), I thought it might feel light and flimsy, however I was pleasantly surprised, it felt solid and strong. It was heavier than my Mozart and about the same as the iPhone 4s I have at work.
Cool it comes with a case!
Even though the polymer body looks absolutely stunning, the dints and scratches on my Mozart are testament to the rough treatment the modern smartphone must endure. Nokia have thought of this and provided a snug-fitting, rubberised cover (Soft cover) that protects the side and rear of the device. Compared to some of the covers I've seen on iPhone's, this one actually looks like it's meant to be there. In fact, if you didn't know any better, you would think that it was actually part of the body.
What's this 1 – 2 business!
After spinning the phone around and checking out all the vital parts, I discovered some rather intriguing text on the top of the device; 1 - push, 2 - slide. Having not bothered reading the quick-start guide, I fumbled around for a while before I finally opened the micro USB port (1 – push) and the micro SIM card holder (2 – slide). Thankfully you don't change your sim all that often, but I did think the flap covering the USB port was a little over engineered. To be truthful, I loved that my Mozart didn't have a cover at all as it made it so easy to connect the cable – something you do all the time when you are deploying apps to your development device.
Is it just me or does that screen look amazing!
Now I know my poor old Mozart has seen better days, but the AMOLED screen on the Lumia 800 is really amazing. Black really is black and the colours are much deeper too. I will not even bother pretending to know why this is, but the result is stunning, you can barely tell where the screen ends and the surround begins – they just meld together.
Over the next few days I am sure I will get the chance to try out some of the Nokia apps, such as Nokia Drive, Nokia Music and Nokia Maps, but for now just let's say that I am one happy camper.
A while ago I wrote a post detailing how easy it was to use the Bing Maps API to GeoCode an address, which enables you to get the geographical position (Latitude and Longitude) of a location when only given the street address.
This has been invaluable in a number of applications since then including the TrafficMATE app which used street addresses to help create Routes to check for traffic incidents. So how exactly can we get the Lat/Long for a location when only given the street address? Well thankfully it's easy.
As in the previous post, we need to start by adding a Service Reference to our project. The Bing Maps API service that deals with Geocoding is located at http://dev.virtualearth.net/webservices/v1/geocodeservice/geocodeservice.svc
I called the reference Bing.Geocode, but feel free to call it whatever you like.
You will also need to get a developer key to use with the API, but don't worry that's easy too. Chances are that if you have already been using Bing Maps with the Map control in Windows Phone 7 then you already have one of these. If not, go get one at http://www.bingmapsportal.com/
The code that calls the Bing Maps Geocode service is fairly easy. In your XAML all you really need is a TextBox where the user can enter an address and then a Button they click to call the function.
//get lat/long for this address
GeocodeRequest request = new GeocodeRequest();
request.Credentials = new Credentials();
request.Credentials.ApplicationId = YourKey;
request.Query = this.TextBoxOrigin.Text;
GeocodeServiceClient client = new GeocodeServiceClient();
client.GeocodeCompleted += new EventHandler<GeocodeCompletedEventArgs>(client_GeocodeCompleted);
client.GeocodeAsync(request);
Then all you need to do is interrogate the results sent back from Bing in your GeocodeCompleted event handler.
void client_GeocodeCompleted(object sender, GeocodeCompletedEventArgs e)
{
GeocodeResponse response = e.Result;
if (response.Results.Count > 0)
{
MessageBox.Show(response.Results[0].Address.FormattedAddress);
}
}
As you can see from the code above, I am simply selecting the first record in the Results array and displaying the Address.FormattedAddress property. Other properties that may be useful are Address.Locality (AKA:Suburb) Address.AdminDistrict (AKA:State).
The other important fields that you will want to process are the Lat and Long. These are contained within the Location array in fields aptly named Latitude and Longitude. These could be easily returned using the syntax response.Results[0]Location[0]Latitude and response.Results[0]Location[0]Longitude.
As mentioned in the previous post, one of the benefits of using your own custom business objects as the data source for your Map control Pushpin layer is that you can access all the information about the item you select.
So how do we get back a single Camera object when a user presses on a pushpin? Well thankfully this is very easy. By using a List<Camera> as the ItemSource for the MapsItemControl control containing our Pushpins we are able to extract the data back when the user presses the Pushpin.
There are a number of methods you can use that are triggered when the user clicks or taps on the screen, but in this example we will use the new ‘Tap’ event, made available in the Mango release. The map xaml has been covered in the previous post, but now all we need to do is add the Tap event handler such as:
<my:Pushpin Location="{Binding Location}" Tap="Pushpin_Tap" >
</my:Pushpin>
The key to unlocking all the goodness obtained by binding the pushpins to your own objects is to realise that the DataContext of the Pushpin actually contains your business object.
private void Pushpin_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
var pushpin = sender as Pushpin;
Camera cam= (Camera)pushpin.DataContext;
MessageBox.Show(cam.Name);
}
In this example we can direct cast the Pushpin.DataContext to our business object, which in this example is called Camera. Once we have a Camera object, we can access any of the properties and methods associated with it.
Obviously you could do a lot more than simply displaying a message when the Pushpin is selected, for example you could navigate to another page displaying information relevant to the selected Pushpin.
One aspect of creating and adding pushpins to the Windows Phone 7 Map control that turned out to be a welcome revelation to me is that most geo-centric Business Objects can be used as the data source for the pushpin layer with little or no modification.
In a previous post we looked at how easy it was to add a single pushpin to the Map control. If we look at that method again, we see that all we really need is a geographical location. This means that as long as your object has a Latitude and Longitude, you can use it as a pushpin.
This was very handy in TrafficMATE especially when displaying camera locations on a map. The Camera object model we created already contained the Lat/Long of the camera. This meant that I could easily use a List<Camera> object as the ItemSource for the pushpin layer.
Here’s the xaml for a map showing camera locations.
<my:Map x:Name="CameraMap"
CredentialsProvider="{Binding CredentialsProvider}"
CopyrightVisibility="Collapsed"
LogoVisibility="Collapsed"
ZoomLevel="16">
<my:Map.Foreground>
<SolidColorBrush Color="{StaticResource PhoneForegroundColor}"/>
</my:Map.Foreground>
<my:MapItemsControl x:Name="PushpinItems" Height="300">
<my:MapItemsControl.ItemTemplate>
<DataTemplate>
<my:Pushpin Location="{Binding Location}" >
</my:Pushpin>
</DataTemplate>
</my:MapItemsControl.ItemTemplate>
</my:MapItemsControl>
</my:Map>
The code that is of interest to us is the section defining the MapItemsContol named PushpinItems. Just like the other WP7 databindable controls, the MapItemsControl supports an ItemTemplate, which in this example is made up of Pushpin controls.
The Location property of the Pushpin, which is of type GeoCoordinate, is bound to a field in our data source called ‘Location’. All we need to support binding is ensure our business object exposes a GeoCoordinate property and we are good to go. A simplified version of the Camera object is shown below.
public class Camera
{
public string Name { get; set; }
public string Description { get; set; }
public double Latitude { get; set; }
public double Longitude { get; set; }
public GeoCoordinate Location
{
get { return new GeoCoordinate(this.Latitude, this.Longitude); }
}
}
With the help of an async call to a webservice, I populated a List<Camera> with relevant results and was able to set the ItemSource for the pushpin layer using something like:
PushpinItems.ItemsSource = cameras;
The key benefit of binding your objects directly to the pushpin layer is that you have direct access to the object whenever you select a pushpin. There is no need to make a second trip to the webservice when the user selects a pushpin - you already know everything there is to know about the underlying object. In a future post, I will explore how you can retrieve the underlying information from a Pushpin created using your business objects.
Now if you have been following along on some of my previous posts about Augmented Reality (AR), you’ll know that the Mango release of Windows Phone offers some great support for developers. So far we have looked at displaying the live video feed from the VideoBrush and also added some Accelerometer features to create a see-through spirit level.
With the release of the Geo Augmented Reality Toolkit (GART), many of the operations required to show geographical points in relation to the user’s current position have been greatly simplified.
First things first, you’ll need to download the GART binary from Codeplex. There are also a number of samples available for download which will help you on your way. Once you’ve downloaded and extracted the dll, you can add a reference to GART into your existing projects and be on your way to easier Augmented Reality apps.
Start a new Silverlight for Windows Phone – Windows Phone Application project in Visual Studio. Make sure to select Windows Phone 7.1 for the OS when you are offered the choice.
Add a reference to GART to your project and add a the following to you MainPage.xaml
xmlns:ARControls="clr-namespace:GART.Controls;assembly=GART"
You will also need to add a reference to System.Device to be able to include Location functionality, such as the GeoCoordinate class.
At the heart of GART is the ARDisplay control, which packages together a number of UI elements, as well as lots of complex calculations to make working with AR apps very easy. The first UI elements we will look at are the OverheadMap and WorldView components.
The OverheadMap element renders just like the regular Map control and displays a Bing map. The WorldView element displays the geographical points in three dimensional space and lies at the heart of any good AR app.
The simplest way to get started with GART is to start by adding a few GeoCoordinate points to the ARDisplay control and checking the results using the OverheadMap UI element. To achieve this, add the ARDisplay control to your MainPage.xaml.
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<ARControls:ARDisplay x:Name="ARDisplay" d:LayoutOverrides="Width">
<ARControls:OverheadMap x:Name="OverheadMap" />
<ARControls:WorldView x:Name="WorldView" />
</ARControls:ARDisplay>
</Grid>
In the code behind, add a few points that you want to show as labels on your new AR app. If you are using the emulator your “current” location will be set to the Microsoft campus in Redmond, so make sure the points you select are located nearby. Currently the Worldview only shows points within 100 meters of your current location.
You can use the AddLabel code from the GART samples to display the GeoCoordinate points you create using this sort of code;
GeoCoordinate pt4 = new GeoCoordinate(47.64523, -122.14090);
AddLabel(pt4, "Studio E");
Now that we have some geographical points we want to display and have set the current location to use for the centre of the ARDisplay, all that is left is to tell the ARDisplay to start running - you can add this code the OnNavigateTo event if you always want to start the control.
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
// Start AR services
ARDisplay.StartServices();
base.OnNavigatedTo(e);
}
Run the project, but be warned, AR functionality is really only useful when testing on a real device. If you are using the emulator you will get the great map shown below, complete with some strange text that overlaps each other.

My recent TrafficMATE Windows Phone 7 app heavily utilised the Bing Maps control for WP7. It was used to plot route in combination with the Bing Maps Route Service API, as well as to show the location of traffic cameras.
The easiest way to get started with the Maps control for Windows Phone is to take a look at the tutorials found in the Labs provided by Microsoft. If you just want to throw up a map to display a single geographic point, then here’s how to start.
Add the control to your xaml
The Map control resides in the Microsoft.Phone.Controls.Maps library, so you will want to add a reference to this library into your project. You will also want to create a namespace reference in the XAML page where you want to use the map control.
xmlns:msmap="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps"
You can then add the map control to your xaml.
<msmap:Map x:Name="routeMap"
CredentialsProvider="{Binding CredentialsProvider}">
</msmap:Map>
Set your Bing Maps API key
To use the map you’ll need to get a key, which is free from Microsoft. Without a key, you will be stuck with the message Invalid Credentials Sign up for a developer account.
The API key is a single string, much like you may be familiar with if you have used the Google Maps API. The Map control makes it a little harder though and expects an object of the CredentialsProvider class. It’s easy enough to create a property in your .cs file that exposes a property of type CredentialsProvider and then bind that property to the map property.
private readonly CredentialsProvider _credentialsProvider = new ApplicationIdCredentialsProvider("Your Key");
public CredentialsProvider CredentialsProvider
{
get { return _credentialsProvider; }
}
Adding a pushpin to the map
The first thing you will want to do with your newly acquired map is to zoom to a certain location and display a pushpin. Thankfully there are a few ways to do this. The first is to programmatically add a pushpin to the map in your .cs file and zoom in.
The bare-bones approach to add a pushpin directly to the Map in your code is shown below.
Pushpin p = new Pushpin();
p.Location = new System.Device.Location.GeoCoordinate(51.42153, -0.20786);
//add the pushpin to the map
routeMap.Children.Add(p);
Compile and run the app and you will get a single pushpin, as shown below.

Just as you can add the pushpin in code-behind, you can also programmatically zoom the map to the chosen location, by setting the map’s Center and ZoomLevel properties. Set the zoom to an appropriate number between 1 and 19, where 19 is very close.
//set the center of the map and the zoom level
routeMap.Center = new System.Device.Location.GeoCoordinate(51.42153, -0.20786);
routeMap.ZoomLevel = 19;

A while ago I wrote a post about creating a simple spirit-level using the Accelerometer in Windows Phone 7. In the Mango release a number of things have changed with the way the Accelerometer API is accessed and how its’ results are returned. There has also been one huge new feature released in Mango that takes the simple spirit-level app to a whole new level. Of course I am speaking about the VideoBrush control, which enables access to the live video feed from the device.
As I pondered potential uses of Augmented Reality, my mind drifted back to the spirit-level application and I began to think about how useful it would be to be able to stand back from an object and determine if it was level. I mean, you have to admit it is easier to stand back from your newly hung photo frame and check that it is level than to simply guess. Ok, you may be able to place your trusty spirit-level (or WP7) against a photo frame and test that it is level, but what about when you are standing in the Louvre and suddenly realise that the Mona Lisa looks a little crocked? I don’t think those burly security guards are going to let you walk up and put your phone on top of the frame.
The first thing you will notice when dealing with the Accelerometer in Mango is that there is no ReadingChanged event. According to MSDN, this has been replaced by the CurrentValueChanged event. The next thing you’ll notice is that the CurrentValueChanged event expects a SensorReadingEventArgs parameter instead of the AccelerometerReadingEventArgs parameter we utilised in our code for Windows Phone 7. In the Mango release, Microsoft have decided to standardise the way developers access the ever increasing range of sensors – including the Accelerometer, Compass, Gyroscope and Motion.
//display the video feed
PhotoCamera m_camera = new PhotoCamera();
this.videoBrush.SetSource(m_camera);
//start the Accelerometer
sensor.CurrentValueChanged +=new EventHandler<SensorReadingEventArgs<AccelerometerReading>>(sensor_CurrentValueChanged);
sensor.Start();
Thankfully, all of these changes result in only a handful of changes to the original Windows Phone 7.0 code. One thing the Mango 7.5 code takes advantage is, especially when dealing with 3D objects, is the XNA framework. This is evident by that fact that the EventArgs returned by the CurrentValueChanged event no longer refer to X,Y,Z, but to a XNA object called Vector3 (Microsoft.Xna.Framework.Vector3). Again, a small change to our previous code enables us to visualise in which direction the device is tilted, just like a real spirit-level.
void sensor_CurrentValueChanged(object sender, SensorReadingEventArgs<AccelerometerReading> e)
{
Dispatcher.BeginInvoke(() => MyReadingChanged(e));
}
void MyReadingChanged(SensorReadingEventArgs<AccelerometerReading> e)
{
//use the XNA Vector3 object to access X,Y,Z
Microsoft.Xna.Framework.Vector3 moved = e.SensorReading.Acceleration;
BallTransform.X = -e.SensorReading.Acceleration.Y * (Track.Width - Ball.Width);
}
