O'Reilly logo

Programming Windows Store Apps with C# by Iris Classon, Matthew Baxter-Reynolds

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Using the Camera

In this chapter, we’re going to look at using the camera. While in previous chapters I’ve endeavored to make the examples applicable to both retail and LOB app use, basic use of the camera is more LOB than retail.

The issue with the camera in retail is that just taking a photo is actually very easy. All you need to use is the CameraCaptureUI, and it’ll return a file containing the photo. (You can also use this class to capture video, although we won’t be looking at that in detail in this chapter.)

In LOB applications, or more specifically in field service applications (i.e., people in the field undertake work for the organization), there are some basic use cases for the camera. You typically need to use the camera to capture work that needs to be done (e.g., inspectors visit an estate and proactively look for problems to solve like graffiti or trash), or to capture the state of something before and/or after work has been done (e.g., you take a photo of a broken sink before you fix it, and again after you fix it). A common related use case is to capture a photograph of the premises if the operative gets to the site but cannot gain access.

All of those scenarios follow roughly the same process: take a photo, store it on a device, and send it to the server when you can.

This chapter will mainly center on building out the functionality to create new problem reports, which will include, among other things, capturing a photo and storing on disk, as well as storing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required