[Update 1: Added the link for the Smartphone bits that you can download]
[Update 2: Added a Bug and Troubleshooting section at the end of this post]
[Update 3: Fixed a few small typos]
One of the things that has bugged me for a bit is the lack of integration between the phone numbers in Outlook contacts and a smart device (such as a Pocket PC or a Smartphone) connected to the computer when it comes to making phone calls.
In Outlook when you right-click on a Contact, it recognizes the context and the fact that there are phone numbers associated with that contact and it gives you an option to call them. Note, I am of course assuming that the said contact has phone numbers – either stored locally or retrieved from the GAL.
If you are running Office 2007 Beta 2, then the menu you see should be something along the lines of the image on the right hand side of this paragraph. (Sorry I have had to block out the actual phone numbers). Now, one would thing that when you click on one of those phone numbers, Outlook will dial that number for you. Well, note quite. Unfortunately, selecting any number, if you have Live Messenger installed, then you get Windows Live Call (which in turn asks me to sign up with some Verizon VOIP service – no thank you). I looked high and low and asked around but could not find anything that will let me send this phone number to my mobile and then use that to dial out. After ranting about it for a while and asking a few colleagues if there was a way, I thought I would write this myself.
So, here is the fruit of last weekends puntering about. There are two aspects to this solution – one that runs on your mobile device and the other is a Windows application that runs on your computer. You would need to install both these to get this working and it will work on both Pocket PC and Smartphone 5.0 (or higher). You will also need to have the .NET Framework 2.0 runtime on your computer and the .NET Compact Framework 2.0 SP1 runtime on your Mobile device. More details on how to install these a little later, but before that briefly explain how this works.
Well, simply you start a Windows application, called "Call A Contact" (yes, it is a Windows app and not a Outlook add-in – more on that in a bit) which "talks" to the other application on your device and instructs it to dial the provided phone number – fairly simple.
So, why a Windows app and not a Outlook add-in. Well basically it is because of time and patience (lack thereof). I only have Office 2007 Beta 2 running, and to get the VSTO CTP bits for Office 2007, the pre-requisite is the WinFX February CTP. For me this is not an option as I need to be on the latest version of the WinFX bits, for the WCF book that I am writing. Being, on the latest CTP, due to time constraints going back to an older version is not an option. Also, assuming I did go back to the Feb CTP of WinFX, the current VSTO bits are not very functional yet and we would still end up struggling. What about Office 2003 then? Well, almost the same similar story there as well. I don't have Office 2003 installed, and I will need to setup a VM with all the right dev bits – which again will take a long time – something I don't have at this point. As a result, the interim solution was to write a simple Win app, and that can be deprecated, with the Outlook add-in – that is when I can get all the bits along with the sun, moon and stars aligned.
How do I use it?
Once you have installed both the desktop and mobile pieces, below are some screen shots showing how to use it from your computer. Make sure your device is connected via ActiveSync and cradled, and then start the app on your desktop (via Start => All Programs => Call A Contact).
You will see the Windows application as shown below. Click on Connect Device; if the connection between the desktop and the device is established then all the other controls will be enabled. The default paths for the apps (depending on the device) are pre-loaded, these can be changed if you installed the apps in some other location. Enter the phone number you want to call and click Run Program – simple as that.
(Before Connection) (After Connection)
The "Check Phone Status", when enabled, will check that the phone is free and only dial out if it is, otherwise you will see a dialog saving the phone is busy. If you don't care about this (which most likely you won't, because if the phone is busy the odds are you are already talking on it and know it is busy . The three things I check for are:
- Incoming Call
- Current Call
- On-Hold Call
Also, on your device if you use File Explorer and browse to where you installed the application (by default this should be in \Program Files\CallAContact and launch the application you will see a simple form where you can enter the phone number and get the same result. The Check Phone Status performs the same function. For example one a number is dialed out and the phone is busy if you try and dial another number with the check phone status option enabled you see an message saying the phone is in use, and to try later.
Note, if the CallAContact application is running on your device (as shown above) and you try to run it form the Desktop application – then nothing will happen. This is simply because since the application is already running on your device, I don't know what to do – should I quit that or not? (Remember we can only have one instance of the application on the device). So as best practice if you are using this on the mobile (though I can't imagine why), then make sure you exit the app when you are finished.
What about the Smartphone?
I have the code for that and have tested it in an emulator, but I need to get a device to test it, to ensure everything is working. You should be able to use this for that without any issues and I will be adding the links using which you can download the setup for Smartphone as well shortly.
What do I need to install it?
Well its not a long list of things, but depending on your current setup it might get a little tricky. Below are the things that are needed on your desktop and device. Please read this carefully as you will need to have all of these up and running.
- Mobile 5.0 device – This can be either a Pocket PC based mobile (like the HTC TyTn) or a Smartphone (like the QTEK 8500), but it has to be a Mobile 5.0 device.
- ActiveSync 4.2 – If you have an older version then please upgrade to version 4.2 from here. (which is the latest at the time of this writing).
- On your computer you will need the .NET 2.0 runtime. If you don't have this already then please get this from here (and it is a hefty download at 24 mb). If you are not sure if you have this already installed or not then skip on further and when you try and install the applications, that will fail (without causing any issues to your machine so you can relax), and will tell you that you are missing this.
- On your Mobile device you will need the .NET Compact Framework 2.0 with SP1. If you don't already have this installed then download it from here (at a heftier 37.1 mb). A couple of things that you need to read through. This is different from the .NET 2.0 bits in the above step. Also if you already have .NET Compact Framework 2.0 installed you will still need to get this as this is with SP1. Also, I would recommend installing this on your storage card – and not using up your main memory on the device.
- If you want more details on how to install it, then see this article for Microsoft.
If for some reason you don't have the .NET Compact Framework 2.0 SP1 installed (or you have an older version installed), when you try and run the application on the device you will see an error something like this:
Here are some screen shots showing you how to install the .NET Compact Framework mentioned earlier:
Steps for Installing
- Assuming you have all the bits mentioned above installed and working correctly then download the two required zip files below.
- Extract each of the files in a separate folder.
- Make sure your device is connected and powered on.
- In each of the folders double-click on Setup.exe and follow the prompts.
Files to Download:
Before you get to the link I should highlight the fact that you should backup all your data and don't come to me crying if something is screwed up because of this.
- Windows Application – WinCallAContactSetup.zip (495 kb)
- Pocket PC Device – CallAContactPocketPCSetup.zip (384 kb)
- Smartphone Device – CallAContactSmartphoneSetup.zip (378 kb)
If you want to change the default path for the program on the device and the type of device to be selected by default, then modify the WinCallAContact.exe.config file in any xml editor (or even notepad). This file can be found in the directory where you installed the application (default path is: C:\Program Files\Amit Bahree\CallAContact\). Change the PocketPCProgram key or the SmartPhoneProgramKey for updating the paths for either of those. Also if you prefer to default the app to Smartphone instead of Pocket PC, then change the WhichDevice from a "0" to a "1". Similarly if you don't want the Check Phone Status to be enabled then change that value to a "false". Note, all the values are case-sensitive.
Here is what the default config file looks like when you install this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="PocketPCProgam" value="\Program Files\CallAContact\CallAContact.exe"/>
<add key="SmartPhoneProgram" value="\Program Files\smartphonecallacontact\SmartPhoneCallAContact.exe"/>
<add key="CheckPhoneStatus" value="true"/>
<add key="WhichDevice" value="0"/>
</appSettings>
</configuration>
I have not done a lot of extensive testing, and I would like to heard your feedback and any issues you have. Also, please let me know if you would like me to extend this.
Lastly, when I get the Outlook add-in I will be posting it here (will get the VM up and running soon) – so keep an eye out – till then copy from Outlook and paste into this. If you are interested in the source code then let me know as well and I can post it up here.
Bugs Found:
- The Windows application had a bug where if the phone number had more than one whitespaces then it will not work correctly. This has been fixed. Please uninstall the old Windows Application, download and install the updated one (using the same links as above). Note, you do not need to update the application on your Mobile device as this was only on the windows application.
Troubleshooting Tips:
- When you try and call the phone number if you see a error similar to the one shown below then this can mean a couple of things. One your device is not connected any more, please reconnect and try again. Or two you did not install the application in the default location, but somewhere else. For example, if you installed the application on a storage card (which is recommended), then for your Pocket PC device change the path to "\Storage Card\Program Files\Call A Contact\CallAContact.exe" (without the quotes of course). If you want to find out the path on your device then use file explorer to see the location as shown in the screen shot below.