MOBILE

Windows Phone 8 : Working with the Camera (part 3) - Camera Lens App

9/21/2013 4:51:33 AM

3. Camera Lens App

You can also create a specialized application called a Camera Lens application that enables the user to access your application as a “lens” in the camera of the phone directly. For a user, your application shows up in the lens in the camera application, as shown in Figure 2.

Image

FIGURE 2 The Camera Lens button

After the user taps the Lens button, they are presented with all the applications that support the Lens functionality. You can see a sample app “MyLens” shown in Figure 3.

Image

FIGURE 3 The camera lenses

When a user selects a lens, the specific app is launched and the app must implement a camera-like experience. If you are using the one of the previous methods to implement your camera (for example, PhotoCamera class), you can just show that page of your application. To be registered for this special type of application, you have to tell the WMAppManifest.xml file that your app supports an extension. Unfortunately, the editor in Visual Studio does not support setting these extensions directly. So you have to open the WMAppManifest.xml file as XML. You can accomplish this by right-clicking the WMAppManifest.xml file and selecting “View Code.” As a child of the App element, you need to add a section called Extensions, like so:

<Deployment xmlns="..."
            AppPlatformVersion="8.0">
  <DefaultLanguage xmlns=""
                   code="en-US" />
  <App ...>

    ...

    <Extensions>
      <Extension ExtensionName="Camera_Capture_App"
                 ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5631}"
                 TaskID="_default" />
    </Extensions>

    ...

  </App>
</Deployment>

The extension type and GUID for the ConsumerID are shown here. These are specific GUID values and not specific to your application. This value must be used. The TaskID should be “_default” that points to the default task in the list of Tasks in the XML file. After this is done, the lens will be registered with the camera on installation of the application.

Other  
  •  BlackBerry Development : Pushing Data to External Users - Web Signals (part 6) - Building a Web Signal - Unsubscribing from a Subscription
  •  BlackBerry Development : Pushing Data to External Users - Web Signals (part 5) - Building a Web Signal - Requesting the Status of a Subscription
  •  BlackBerry Development : Pushing Data to External Users - Web Signals (part 4) - Building a Web Signal - Pushing Data to Subscribers
  •  BlackBerry Development : Pushing Data to External Users - Web Signals (part 3) - Building a Web Signal - Web Signal Domains, Web Signal Subscriber Registration
  •  BlackBerry Development : Pushing Data to External Users - Web Signals (part 2) - Signing Up for Web Signals
  •  BlackBerry Development : Pushing Data to External Users - Web Signals (part 1) - How Web Signals Work
  •  Holiday Gift Guide – Smartphones – Aug 2013
  •  Holiday Gift Guide – Tablets – Aug 2013
  •  Wacom Cintiq 13HD - A Space-Saving Pen Display For Designers (Part 2)
  •  Wacom Cintiq 13HD - A Space-Saving Pen Display For Designers (Part 1)
  •  
    Top 10
    Review : Sigma 24mm f/1.4 DG HSM Art
    Review : Canon EF11-24mm f/4L USM
    Review : Creative Sound Blaster Roar 2
    Review : Philips Fidelio M2L
    Review : Alienware 17 - Dell's Alienware laptops
    Review Smartwatch : Wellograph
    Review : Xiaomi Redmi 2
    Extending LINQ to Objects : Writing a Single Element Operator (part 2) - Building the RandomElement Operator
    Extending LINQ to Objects : Writing a Single Element Operator (part 1) - Building Our Own Last Operator
    3 Tips for Maintaining Your Cell Phone Battery (part 2) - Discharge Smart, Use Smart
    REVIEW
    - First look: Apple Watch

    - 3 Tips for Maintaining Your Cell Phone Battery (part 1)

    - 3 Tips for Maintaining Your Cell Phone Battery (part 2)
    VIDEO TUTORIAL
    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
    Popular Tags
    Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8