Bring your photos to the party

Abstract: Learn how to use Windows Live Mesh to carry your Flickr photos with you on your Windows Mobile phone.

For years I’ve relied on Flickr as my service for hosting photos that I’m willing to share with friends and others. Yet there has never been a good way of downloading all the Flickr photos, there has been some third party tools that used the Flickr API (I’ve developed one myself) – but these have been “shut down” by Flickr due to privacy and copyright issues.

What do I mean with the title, “Bring your photos to the party”?

It’s fine to put your photos on Flickr, but sometimes there is that special photo you want to show to someone while you’re on the bus or at a party. Yet, you don’t have internet connection or a computer easily available. That’s why I made this solution that uses Flickr .NET API and Live Mesh to do synchronization between your mobile and PC.

 

Installing Windows Live Mesh

If you don’t have Windows Live Mesh on your computer yet, it’s about time to get it. Live Mesh is a new tool from Microsoft that allows you to easily sync, share, and access the information you care about. You can share your photos, documents, videos, settings or whatever file you have laying around. In the future, you will be able to install and developer your own custom applications against the Live Mesh.

Open the Live Mesh site in your web browser to sign in and download the Live Mesh Client.

https://www.mesh.com/

LiveMeshWeb

From this website, you can register the current machine and you can access the other machines remotely. There is additionally a Live Desktop which is a rich Silverlight client that runs in the web browser and gives you access to all your content wherever you are. On holiday and need to upload some travel photos? No problem, just hit the Live Mesh website and upload without any installation (as long as you have the Silverlight plugin).

LiveDesktop

 

Getting Live Mesh on your Windows Mobile

If you have a Windows Mobile device, you can install the rich client directly on your mobile phone by visiting https://m.mesh.com/ and logging in with your Live ID. If you access the web site, you can choose to install the client or use the mobile version of the web interface. This means you can access Live Mesh using any device that has a web browser, for example a Nokia or Apple iPhone.

Notice: Currently Microsoft have only opened up Live Mesh Mobile for customers in the US or UK. So to access the mobile client, you need a Windows Live ID  that is registered in the US or the UK.

Configuring Folders

Feel free to configure your shared folders how you’d like. By default, Live Mesh Mobile will create a folder called “Mobile Pictures” that maps to your local pictures folder on your phone. This is fine and I would just leave it like that, this means all the photos you capture with the phone camera will be synchronized with your PC. My suggestion is to create a sub-folder within the Mobile Pictures called Flickr. This is the location where we will download photos from the Flickr photo service.

Example path on my computers: C:\Users\Sondre\Desktop\Mobile Pictures\Flickr

 

Getting Photos from Flickr

To get content from Flickr you can use their open web API directly, or you can utilize an existing .NET API developer by Sam Judson called Flickr.Net.

So to get started, let’s launch Visual Studio and create a new project. You can use your favorite UI framework to do this, be it a Console Application, Windows Presentation Foundation or in my case, Windows Forms.

With your project created you can continue by adding a reference to the newly downloaded FlickrNet.dll that you found on the CodePlex site.

Next step is to write some code that integrates with the authentication mechanism of Flickr. This is not a necessary step if you are developing this for your own project – but since there might be someone that want to download the example program from this post and just run it, we need to do the following.

Apply for Flickr API key

Flickr has started with two types of API keys, non-commercial and commercial keys. For this project we’ll apply for a non-commercial. Visit the website and apply for an key: http://www.flickr.com/services/api/keys/apply/.

FlickrApplyForKey

On the next step Flickr asks us to fill out some details on our project.

FlickrProjectDetails

When the submit is completed you will receive your API key and secret. These two values are important to make your communication with the Flickr API work.

FlickrKey 

There are plenty of examples on how to do the authorization of your custom application. I won’t go into the details in this post, but in the source code for this project I have done some code that will handle everything for you. All you need to do is configure your API key and secret in the FlickrService.cs file.

Edit the two following lines with your own key and secret:

private static string _apiKey = "645f3f0d9c98xxxxx1fbed70d341";
private static string _sharedSecret = "bfc2bfxxxxx1b9"; 

 

Running the Flickr2Mesh Application

When you first launch the Flickr2Mesh application, you can choose which folder you have enabled Live Mesh to synchronize. Then you need to authenticate the application to allow Read permission to your photo albums. While this step is not absolutely necessary, it will allow the application to download photos that have been tagged with access only to yourself, your friends or your family. For the purpose of this post, we do not support custom user name to be filled out in the application. Please respect the copyright of individual photographers and respect the policy of Flickr if you decide to extend the Flickr2Mesh application with the ability to download anyone's photos.

Flickr2Mesh

So the first step is to decide which folder the application should download all your photos. The next step is to click the authentication link at the bottom to authorize the application to access your photos.

Flickr2MeshAuthorize

When you click the Authorize button your default web browser will open Flickr.com and you should login with your credentials. After you’ve logged in, you will be presented with a page to confirm the authorization of Flickr2Mesh.

FlickrAuthorize

Once accepted the agreement, you can go back to the Flickr2Mesh application.

FlickrAuthorizeSuccess

Flickr2MeshAuthorizeComplete

Click the Complete button to finalize the steps of authenticating Flickr2Mesh.

Flickr2MeshAuthorized

Flickr2Mesh is now fully authenticated and you should see your Flickr user name display at the bottom of the application. The download button becomes enabled and you can start downloading all your Flickr photos in Small, Medium, Large or Original. By default it’s set to Small which is a good size for mobile phones. If you have one of those fancy new mobiles with 800x480 pixels, I suggest you go with the Medium settings or even the Large. If the application doesn’t find the specified size of an photo, it skips that download.

DownloadOptions

For the purpose of this post, I won’t add any addition filters than the photo size. If you have a huge library of photos on Flickr, I suggest you add additional filters like search text, specific photoset or some properties that you can filter on with the Flickr API. My suggestion is making a photoset where you put all your Mobile photos.

Flickr2MeshDownloading

Now Flickr2Mesh will proceed to download all your photos in the size you selected into the folder of your choice. On your task bar you might start to see the Live Mesh icon start to animate. This means it’s currently synchronizing the photos are you are downloading from Flickr.

Icons

If you want to start using the Flickr2Mesh application right now, you can download the finished application from the link here. The full source code is also available for those who want to dig deeper into the Flickr integration and extend it with your own features.

 

Source Code

Instead of doing a walkthrough on how to write the application from scratch, you can download the compiled binary or the source code. The application is pretty simple but fully functional. It’s a starting point that you can easily extend to do additional actions with the Flickr photo service. Source is licensed under Creative Commons Attribution, that means you can do (almost) whatever you want with it.

 

What’s next?

Remember that Live Mesh currently supports up to 5GB of online storage. If you go beyond this size, files will no longer be available on the Live Desktop but they will continue to sync between your computers and mobile phone. Microsoft have said earlier that you will be able to specify if a shared folder should be uploaded to the cloud or just work with a Peer-to-Peer (P2P) mechanism between your PCs. So far I have not seen an option to turn off online sync.

Hopefully Microsoft will open up Live Mesh Mobile to the rest of the world soon, that way everyone can experience the benefits of having a rich Live Mesh client everywhere you go.

Hope this introduction to Windows Live Mesh and Flickr Photo Service has been useful and check back later for more Live Mesh development.

 

Flickr2Mesh by Sondre Bjellås is licensed under a Creative Commons Attribution 3.0 Unported License.
Creative Commons License


Microsoft’s bold new design initiative

As of late Microsoft have started a new path in their design and user experiences (UX). This is starting to become evident in their Windows Live Essentials package, Windows 7 and their websites. Why is this so important that I’m writing a blog post on the subject? Let me start with some background on my history.

Growing up I was fortunate to have a dad that worked in printing as a typographer. He was one of the first individuals in Norway to purchase an Apple Macintosh and lucky me, I was able to play around with his computers. One of my hobbies as a youngster was to design and write newspapers that I walked around and sold in the neighborhood. During this time I spent a lot of time with my farther who teaches me how to design well formed flow in the layout. Fast forward some years and I received my own Macintosh on which I formed a passion for graphical design and web sites. That’s how I got my first job, as a web designer back before the DotCom Bobble. My career as designer didn’t live for long as I quickly moved into coding and built web sites for a living. With my background I’ve always had an interested in the esthetics of just about everything from building architecture, to car design and computer software.

My vision of great software is 50% design and 50% functionality/quality. It doesn’t matter how good your product is, if it doesn’t have a usable (and good looking) interface, you’ll have a hard time selling it to your customers. Design is very important in our lives, we see it every day in advertisements, newspapers and magazines. First impressions is important and in designer clothes people takes notice of you. But having a good design (aka. expensive clothes) doesn’t mean your successful, intelligent or any better than everyone else.

Which brings me on to the battle of operating systems: Microsoft have for many years had a benefit from their standardized UI guidelines. Third party developers on the Windows platform have thrived and most ISVs have followed the established guidelines. It made it easier to sell (for third parties) and easier to teach and learn by those who’s required to use the software.

Things are about to change…

Mac OS X With the advent of Mac OS X, we saw a new direction at which the desktop is becoming a visual design statement in it’s own right. Good design has been catching on with computers and devices for some years now (luckily we’re not all using gray dull boxes any longer), starting with Apple’s excellent hardware design on their Macs and lately their iPods and iPhones. Apple released the desktop version of OS X in march 2001 and have had great success with their sales since then (My days with Mac OS ended at version 8).

Microsoft seems to take notice on what has happened… lots of people have complained about Windows Vista and called it a failure, as much as Microsoft representatives (like Steve Ballmer) even admits they had some problems. Personally I’ve used Windows Vista since some of the early betas and I’ve never looked back. I could never use a computer with Windows XP, not as long as the hardware is capable of running the OS. It’s a known fact that Microsoft under-delivered massively when it comes to the initial visions of Vista – some ideas which won’t even make it to Windows 7. I love Windows Vista and I’m sure most users will enjoy it if they give it a try – it’s been the target of a general misconception and misunderstanding for a long while, something that Microsoft tried to show with their Mojave Experiment.

Windows Vista was a nice breath of air coming from Windows XP, but it did not represent any dramatic change in the UI (User Interface) and there was some minor changes to the UX (User Experience).

Starting from recently Microsoft have moved into a new direction that has a more dramatic impact on our computer desktops and applications. There are four big driving forces (platforms) for this change and that’s Windows 7, Windows Live Essentials, Microsoft hardware, and Microsoft Web Sites. I’m excited to see what will happen in the space of Microsoft hardware, they’ve recently rolled out some very hot products like LifeCam Show, LifeCam VX-5500 and Arc mouse as you can see below.

ic_lcs_otherviews01 VX5500 arc-mouse

Another driving force is the websites. Web is very important and it’s the primary channel for information distribution and sales for many corporations and retails. We have come far from the early days of NCSA Mosaic web browser when it was all about static HTML pages with blue underlined links and animated gif files.

mosaic

If you navigate around on Microsoft.com today, you’ll quickly understand how things are changing. The new Windows site has no indication on what is actually a link or what’s just static text. Site looks nice, but what about usability? I have to move my mouse all over the site to get a grip on what’s going on and what’s available.

Windows

Digging deeper you’ll find the Windows Vista Upgrade Advisor page. I think this is a good example on something gone very wrong. The top part of the page is conformed of four (4) menu structures. Not only that, I’m informed that I’m currently looking at “Windows Vista Upgrade” advisor from the page title, the page headline, the fourth menu link and the sub title of the actual content…

WindowsVistaUpgradeAdvisor

Esthetics is all about how your emotions react to the sensory inputs. That something has good esthetics is founded in our physical bodies, although it’s a highly subjective experience, we are all bound to some of the same basic principles. Just because an artist makes something and calls it art, doesn’t make it art. At least not in my opinion. I won’t go any further on the web space, just add a comment that I’ve always thought Microsoft does great design on the web, they still have something to learn when it comes to the concept of less is more. Apple’s website have not changed much in recent years, but it’s still extremely useable. It’s a more unified as well.

Update 9th November: Recently Microsoft upgraded the UI on Windows Live Hotmail to go with the new guidelines and if you ask me I prefer the old design. Most positive feature of this new design is that it actually respects the browser text size and it scales very beautifully according to my settings. The bad thing though, is how IE7 added support for “zooming” on web sites. If you zoom in and out in the browser (this is not only an IE problem, same behavior in FireFox) you’ll see how poorly thought out the feature of zooming is in today's modern browsers. I don’t understand why we need two different concepts of increasing the size of a webpage. Text-size was enough…

WindowsLiveHotmail

Windows Live Essentials is the name of the package software applications that extends Windows functionality. Windows Vista had some of these applications built into the OS, this has been a big mistake from Microsoft. They never released any updates for them, but instead they started distributing a “clone” of the included applications under the brand of Windows Live. Windows Photo Gallery, Windows Live Photo Gallery, Windows Mail, Windows Live Mail … and the list goes on. I’m happy to hear that Microsoft is correcting this mistake with Windows 7, where they are stripping the OS down to the basics.

The following screenshot shows how the toolbar in Windows Live Photo Gallery, Windows Live Mail and Windows Live Writer (all beta versions) now have close to none icons. While this obviously does turn my focus more into the content of the applications, I’m highly distracted by the toolbar when I’m about to perform an action. I think they need to consider a new concept of separators (as we’ve grown used to for years now) that puts actions within the same context together. Having “Add to calendar” and “Delete” right next to each other is asking for trouble. Windows Movie Maker is getting a total makeover and it’s receiving the Office 2007 toolbar. Which I think is a good idea and it should be explored as a possibility for all of the Windows Live Essential applications. Windows 7 applications will have the new toolbar, Word Pad, Paint and others already have the toolbar redone for Windows 7.

Windows Live Essentials toolbars

In the beginning, Windows Live Essentials carried the design and theme of Windows Vista but in the recent beta they redid a lot of the UI, removing almost every icon that has for many years worked as visual clues and hints. This seem to be a new guideline from Microsoft, their message is that applications should allow you to focus on what matters – your content within the applications. I was initially very skeptical to this and I’ve aired my concern to Microsoft and I’m still not sure if it’s a good way forward. Sure, the toolbars doesn’t look very obtrusive, but they are getting much harder to adapt too. The good thing of getting an early look at these applications, is our ability to give Microsoft feedback and be part of changing the future.

Have a look at how Paint is changing into a very usable application with the Office 2007 toolbar.

Win7paint

Let me step back a bit: Some years back my cousin had some computer problems and called me for some assistance. Upon arrival, I realized that her desktop was neither in Norwegian nor English. It was actually Dutch, as her boyfriend is from the Netherlands. Without a hitch, I was able to fix her computer without knowing a single word of Dutch. How was that possible? Thanks to a consistent UI and icons I was able to navigate through her Windows XP machine like child’s play. Will I be able to do the same feat after Windows 7? I’m not sure…

Windows7Desktop At Microsoft PDC 2008 I received an early copy of Windows 7 and I’m already running it, there are some good improvements in the UX that I welcome. It’s also quite clear that Microsoft is taking lessons from somewhere in regards to the new task bar. Icons and running applications are treated in a similar manner, with small visual clues to whether the application is running or not.

Do you think your grandmother cares if Windows Media Player is currently running or not? She just knows to click the correct icon (hey, did I mention that icons are good visual clues and that humans are more visual than textual?) and play her music. Some people predict that we’re moving into the final years of the written language and that the future will be fully vocalized. We can today record everything we say thanks to immense storage capacity and voice recognition is getting better. Which reminds me, I’m looking forward to improvements in that area for Windows 7, have not heard much yet. I’m rambling on, but I’m just trying to prove a point that having textual actions for everything will diminish the usability of the computer desktop.

Less is more is said a lot by many – it has never been followed by Microsoft. They have continued to add requested features to their products, to a degree where Office required a total UX redo with the 2007 release. We will see some of the same (reduction of clutter) happening in Windows 7. Apple has followed this recipe for years with great success – which is one of the reasons I prefer Microsoft products. They (Microsoft products) are so feature and functionality rich that I can do just about anything I want, and most of them are extensible by third party ISVs. Apple products has success with giving the minimal set of functionality that 90% of users require, but there’s always the 10% that is not comfortable with less. I’m hoping that Microsoft can do both, have a rich feature set with good design.

There is a lot of great innovations at Microsoft that is driving this new design initiative and it makes me happy as I love good design and think it’s important. Still, they will do things both good and bad. Nobody ever gets everything right or perfect the first time, but it’s much better than status quo. Some innovations from Microsoft that is driving this innovation is technologies like Windows Presentation Foundation and Silverlight, which are foundation for Microsoft Surface and Zune.

One digression: My biggest feature request for Microsoft is “View” mode named “Full” in both Windows Explorer and Windows Live Photo Gallery that displays photos at their actual size! There is nothing I hate more than having to double-click photos in Explorer or Gallery and having to wait for the photo to load. I want to scroll through all my photos in both applications without having to open every individual photo. I want to use scroll mouse and page up/page down to scan through my photos. What do you think? Leave a comment!

It’s exciting times as a developer AND a consumer and I hope you share some of my enthusiasm for what’s coming!


Visual Studio IDE

VS Gøran Hansen tagged me once more, this time he want us to blog about our customization of Visual Studio IDE and third party tools we use in our daily jobs as software developers.

To be honest, I rarely customize anything. I rely on few (if any) third party tools within the IDE and just a handful of tools that runs outside of the Visual Studio IDE. My main focus is Team System and extensions f or that.

After I read Gøran’s post, I decided to start customizing and the first thing was to download and import the DistantShores Visual theme. My favorite font type is Consolas and size 15 pt.

My primary difference from some of the other people that have blogged about this, is that I always rely heavily on Visual Studio Team Foundation Server. It’s the foundation on which I do all my work. It gives me features for work items, build definitions, continuous integration, reporting, source control, unit testing, web and load testing, static code analysis, performance analysis and lots more.

Testing

For my testing needs I rely on the built in capabilities of Visual Studio Team Editions. I have a license for the Team Suite, but unit test is available in the Developer and Tester editions as well. If you happen to have a Testers or Suite Edition, you get a lot more test capabilities which is not available in Developer Edition, like manual tests, web tests, load tests, ordered tests (rarely use this).

Functional web testing is done using a third party tool called WatiN. An awesome tool that automates web browsers. You might think: “Hey wait a minute, that’s already built into Visual Studio?”. Yes and no, Visual Studio has a test type called web test, but it does nothing more than simulate HTTP requests, it doesn’t render the HTML. This means a web request using the normal Web Test doesn’t load graphics, CSS or JavaScript. It’s not possible to validate if the markup is what you except. Web Test in Team Editions can be used for load tests, not for functional tests.

As a Microsoft Regional Director I have some benefits, like free licenses for lots of software and tools. Just how Jessica Simpson, Brad Bit and Britney Spears receives free clothes, jewelry and dresses from stores, we receive deals in return for promotion and us using their products in presentations, etc.

One such deal is for mocking frameworks, which I have rarely used before. For most of my mocking needs, I implement my own mocks and I use dynamic loading of assemblies using .NET reflection and configuration files. I’m looking forward to Managed Extensibility Framework (MEF) which was announced at PDC2008. This should make it quicker, simpler and more manageable to write add-in based solutions.

Addins

Some addins I’ve installed a few times but I rarely use any of these are:

Shortcuts

  • Ctrl-Shift-B – Build Solution
  • Ctrl-Shift-X – Run Tests In Current Context (I remap the Ctrl+R,T to Ctrl-Shift-X)

Tools

  • WiX – Essential tool that I use to build all my installation packages.
  • Reflector – This was recently purchased by RedGate, but it’s a tool I’ve relied on for many years.
  • Sandcastle – Generates “MSDN” documentation from XML comments.
  • Paint.NET – image tool, use this for everything.
  • WatiN – functional web testing.

Other People’s IDE

So there you have it, nothing fancy after all… but make sure you check out some of my friends posts on how they pimp their Visual Studio IDE.


Uncle Traveling Geek

Hollywood In good spirit of the old and warm memories of Uncle Traveling Mack, I decided to write a post on how “Geek of the Year” packs his bag when he’s going to a conference. This time it’s the Professional Developer Conference (PDC08) in Los Angeles, USA.

For once I decided to start packing a few days a head, just to get my brain started. I’ve always been a poor planner and when I saw the evening news tonight – some scientists had found that the brain in certain male monkeys change when they become a parent. I guess I feel like I have to show that it’s possible to be a geek and have good order. Naaah.. screw that, I’ll wait for our first child to appear, then I can change.

Computer

The main device a geek takes with him when going traveling is of course the computer. In my case, it’s a slate tablet PC, one that has no keyboard at all. Have had an eye on the small Eee PCs and maybe for my next trip I’ll bring two computers, but right now I’m happy with my TabletKiosk Sahara.

tablet-i440d
TabletKiosk Sahara i440D

Gadgets

There is one thing a man can never get enough of, and that’s gadgets! My first 4 gadgets (+ my computer) all supports going online on wireless networks. Here is the list of stuff I’m packing in my bags:

Microsoft Zune
Microsoft NX-6000 webcam
Apple iPod Touch
Sony Playstation Portable
Sony HDR-HC5 
HTC TyTN II mobile phone
HTC MTeoR (backup mobile)
Bose noise-canceling headphones

 Zune Ipod_touch PSP TyTN_II Sony-HDR-HC5 bose-quietcomfort NX6000
Zune, iPod Touch, PSP, TyTN II, HDR-HC5, Bose headset, NX-6000

Books and Games

During take-off and landing it’s always hard to be a real geek. Your fingers starts twitching and it’s hard to keep your gadgets turned off. You start to think conspiracy theories and there is no way anyone can fool us into believing their lies. There’s no way my puny little Zune or PSP can bring the airplane down. Dell laptop’s with rouge batteries on the other hand…

On the Zune I only have the two games that comes with 3.0 upgrade, Hexix and Texas Hold’em. My iPod touch only has NES emulator, and for my PSP, I have purchased some games to keep me entertained. It was Scott Hanselman that told me to get PSP and God of War, and who can say no to Scott? So PSP games are as followed: God of War: Chains of Olympus, Killzone: Liberation, Burnout Dominator, LEGO Star Wars II: The Original Triology, Tekken Dark Resurrection. If you love some PSP games, please leave a comment and I will check them out.

Books I brought with me is Evolution by Edward J. Larson, Microtrends by Mark J. Penn and Visions of Technology edited by Richard Rhodes.

Recharging, Updating and Patching

So this evening I figured I should recharge, update and patch my devices. The iPod touch is rarely used, so I figured I should install the latest iTunes and upgrade. To my big surprise, Apple wants me to pay money for the upgrade. What’s up with that? I realize that Apple have been mean to desktop users and charging money for every single “Service Pack”, but come on! And I had some songs that I purchased, they couldn’t be “authorized” to be played on my new computer. DRM never gets funny. My Sony Playstation Portable was upgraded with the latest firmware as well, which of course was free (would you expect anything else?). It now comes with Sony online store right on the device, so I used it to download a couple of demos which I can enjoy on the flight to Los Angeles. My Zune was upgraded earlier as I wrote here.

Hollywood here I come

This is my first time traveling to PDC and Los Angeles. PDC is a geek-fest where Microsoft is showing of their future technologies, I will try to update my blog with some details as I attend sessions. There will be a lot of sessions on Visual Studio 2010, Windows 7, Windows Mobile 7, Windows “Cloud”, Microsoft Surface, Codename “Oslo” and a whole lot of other cool stuff!

Which reminds, I’m a Connected Technologies Advisor for the product group that is working on the “Oslo” project, which I think is a fitting name (as I’m a norwegian and I live in Oslo). And it was here in Oslo where Steve Ballmer “announced” Windows “Cloud”. How about that? And how about this photos of me with other NNUG leaders and Steve Ballmer?

 NNUG_Steve_Ballmer_Sondre_Bjellas
Back from left: Edgar Stokka (NNUG Stavanger), Sondre Bjellås (NNUG Oslo), Tor Einar Solli (NNUG-leder), Karl-Heinz Fiegl (NNUG Kristiansand), Fredrik Kalseth (NNUG Vestfold), Gøran Hansen (NNUG Trondheim), Jan Ove Halvorsen (NNUG Haugesund) Front from left: Lars Wilhelmsen (NNUG Oslo), Anders Norås (NNUG Oslo), Jon Arild Tørresdal (NNUG Bergen), Steve Ballmer (CEO Microsoft Corporation), Joar Øyen (NNUG Trondheim), Einar Ingebrigtsen (NNUG Vestfold), Rune Grothaug (Microsoft Norge)

Are you going to PDC? Please hook up with me, leave a comment here on the blog or send me a quick e-mail.

Copyright notice: Hollywood photo taken by “Shanty” Cheryl Groff, original link.


Windows Mobile Photo Capture

Ever since I first read about Microsoft Research’s MyLifeBits project I’ve wanted to have my mobile phone continuously capture photos throughout the day wherever I’m going. The following post will describe how you can make a project that will allow you to save photos at a timed interval to a memory card or the device memory.

The basis for this project is Marcus Perryman’s post on Timed Camera Capture. Marcus fails to provide a binary version of his CameraCaptureDLL.dll – which means anyone that wants to use his example is required to install Visual Studio 2005 C++ and the correct device SDK for SmartPhone. I’m fortunate enough to have Visual Studio Team Suite, so I have everything that Microsoft provides of feature, but I still was not able to successfully open his source code and compile it. After a good while messing around (thinking the problem was related to my machine being x64), I figured a way how to actually create a project from scratch and move Marcus’ source into my own project.

I won’t go into details on how you can do this on your own, but I will provide a compiled version of my own C++ wrapper around the camera API. This one is compiled from a project configured with platform Windows Mobile 6 Professional. I doubt this has any effect and I’m sure the .dll file will works just as fine on Windows Mobile 5 or Windows Mobile 6 Standard.

The next step is to actually create your own Smart Device project and start writing your application that interact with the native MobileCamera.dll which allows you to capture photos without relaying on the built in dialogs in .NET Compact Framework.

Instead of going into all the details on how you interact with the API, I have made a quick implementation that contains the Smart Device project and installation project that generates a .cab file you can run to install the application on your mobile phone. The application will save photos in a folder called “Photos” under the installation folder for your executable, with a date time stamp added to it. You could extend the application on your own with an option dialog where you can choose the save folder.

Mobile Capture Screenshot
Mobile Capture running on Windows Mobile

It will probably take a few seconds for the first photo the be captured, so please be patient when you first hit the Start button. After it’s starting to capture, you will start to see files in the “Photos” folder.

See the photo below for an example on the default quality that the application captures with.

Capture_20081003-102418
Example photo that has been captured

Here is the .cab installer and the .zip with the source code. Most of the source code is taken from Marcus Perryman’s example so all credits to him, I only cleaned it up at bit and made it Visual Studio 2008 compatible.

So there you have it, a quick solution to photo capture on your Windows Mobile from .NET Compact Framework. In the future you will see how I’m synchronizing my photos with my computer and how I visualize and analyze the vast amount of photos I’m collecting. Thinking of possibly using Live Mesh as the framework to move photos between devices. Have fun!


Pages

Search

Tags

None

    Recent posts

    Recent comments

    Blogroll

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.