D'Arcy from Winnipeg
Solution Architecture, Business & Entrepreneurship, Microsoft, and Adoption

WP7–Getting Picture Taking Code to Work

Sunday, April 3, 2011 1:04 PM

Doing some final prep for speaking at this week’s Winnipeg IE9/WP7 bootcamp and ran into an issue with one of the demos. It’s a picture taking sample, showing how to programmatically implement functionality to interact with the phone’s camera.

In the emulator everything worked fine, but when I deployed to my device I’d continually get a “User Cancelled” message after trying to snap a pic (this was coded in the event that the user cancelled taking the picture).

A quick ping to WP7 MVP Mark Arteaga got me the answer and a solution: it’s a Zune software issue. In fact, if you have your phone attached to your computer and Zune running, you don’t have access to the camera functionality be default until you disconnect, so it makes sense that you wouldn’t have access programmatically either. So what can you do?

There’s a tool called WPConnect that allows you to connect to your phone without requiring the Zune software. Once you run it, you can deploy your app and test out the media features without issue. You can read up on the tool here.


No comments posted yet.

Post a comment