Increasingly, I’m doing more of my (non-work) web browsing on my PDA.
And as a big fan of using del.icio.us to store and share interesting sites that I come across, I’ve missed the tools you can get for desktop browsers (like Internet Explorer or Firefox) that let you throw your current page at your del.icio.us list.
If you’ve not used them before, the idea is to have a popup window that gets prefilled with the URL and name of the page you are looking at in your browser, lets you add a few tags, then submit it to del.icio.us when you hit ‘Save’.
So I thought I’d have a go at creating something similar for Pocket Internet Explorer – the browser you get with Windows Mobile.
To cut a long story short, I’ve put something together and it seems to work. If you have a Windows Mobile PDA and fancy giving it a try, feel free to give it a go.
To go into a little more detail… it was more of a pain than I expected.
Internet Explorer really isn’t the most friendly beast to the plugin writer! Basically, I needed to write a DLL in C++ that hooked into one of the menu extensions in Pocket Internet Explorer.
This is not as trivial as I expected – it took hundreds and hundreds of lines of code just to get a new entry in the Internet Explorer’s menu that gets me access to the web browser object as an IWebBrowser2. And (perhaps especially so for someone who has been getting a little lazy with Java and C#! ), some of it is a little intricate and complex.
Still, once done I could use my access to the browser to launch my “post to del.icio.us” form and prefill it with the URL and page name of PIE’s current page. From there, the form uses the public del.icio.us API to send all the info off to my del.icio.us list.
I should say a few thanks… I was helped out in my hacking from a few places:
- A Microsoft presentation on developing for Pocket Internet Explorer as a platform – with a list of the extension points you can get into with a DLL
- A code sample from Microsoft on context menu extensions – it’s a nice start that helped me get up to speed on writing code to hook into them
- A pointer I got from an MSDN forum on building projects with IWebBrowser2 in Visual Studio
- The .NET del.icio.us API code I found on SourceForge – modified a bit to be able to run on the .NET Compact Framework you get on Windows Mobile, but still saved me some time in having to prepare the web request and reading the response
- The official del.icio.us API documentation
Update 19/07/2007: The zip file is now packaged as a CAB file which you can run on your PDA. This handles the registering of the DLL for you. (I really should have done it this way to start with… sorry!)