2 out of 2 rated this helpful - Rate this topic

Pictures Extensibility Overview for Windows Phone

Windows Phone

March 22, 2012

With App Connect, your application can extend the Windows Phone Pictures Hub and pictures viewer experience. You can also extend the share picker and allow users to upload pictures to a web service. This section describes how you can use App Connect with your Windows Phone application.

Your application can extend Windows Phone in the following ways:

Important noteImportant Note:

Pictures extensibility has changed in Windows Phone OS 7.1. For information about how to extend the pictures experience in applications running on Windows Phone OS 7.0, see the Windows Phone OS 7.0 developer documentation here.

In Windows Phone SDK 7.1, the Extras.xml and E0F0E49A-3EB1-4970-B780-45DA41EC7C28.xml files are not required. When upgrading applications that extend the pictures experience to Windows Phone OS 7.1, remove these files and use the new extensibility techniques described in this section.

To use App Connect, specify the way you want to extend the picture experience by declaring a pictures extension. Extensions are declared in the Extensions element of the Windows Phone application manifest file, WMAppManifest.xml. For more information about the application manifest, see Application Manifest File for Windows Phone.

Each pictures extension follows the same general format. The following is an example of a Pictures Hub extension.

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

The Extensions element contains three attributes: ExtensionName, ConsumerID, and TaskID; these are described in the following table.

Attribute

Definition

ExtensionName

Identifier for the type of pictures extension. Values can be Photos_Extra_Hub, Photos_Extra_Viewer, or Photos_Extra_Share.

ConsumerID

Each pictures extension uses the value 5B04B775-356B-4AA0-AAF8-6491FFEA5632.

TaskID

If defined, routes the invocation to the defined TaskID. If not defined, defaults to _default.

To enable application launch from the apps pivot page in the Pictures Hub, add the Photos_Extra_Hub extension to your application manifest file. When your application launches from the Pictures Hub, no parameters are passed to your application via the deep link URI; your application will launch as a standard application launch.

From left to right, the following image shows how to navigate to your application from the Pictures Hub using App Connect.

AP_Con_CameraPhotoHub

After opening the Pictures Hub from the Start screen, swipe to the pivot page named apps. Note that the apps pivot page will not appear in the Pictures Hub until you have at least one application installed that extends the Pictures Hub. From the list of applications on the apps pivot page, tap the application link to launch the application.

To enable application launch from the Pictures Hub, add the following extension to the application manifest file, WMAppManifest.xml.

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

For more information, see How to: Extend the Pictures Hub with App Connect for Windows Phone.

To enable application launch from the apps link in the picture viewer, add the Photos_Extra_Viewer extension to your application manifest file. When your application launches from the picture viewer, a parameter named token is passed to your application via the deep link URI. The parameter value, the token, corresponds to the picture that your application was launched from. Using the token, you can provide a rich user experience based on the picture that the user was viewing.

From left to right, the following image shows how to navigate to a photo application from the picture viewer using App Connect.

AP_Con_PhotoExtras

When viewing a picture in the picture viewer, tap the Application Bar at the bottom of the screen and click the link named apps. Note that the apps link will not appear in the picture viewer until you have at least one application installed that extends the picture viewer. From the list of applications on the APPS page, tap the application link to launch the application.

To enable application launch from the picture viewer via the apps link, add the following extension to the application manifest file, WMAppManifest.xml.

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

For more information, see How to: Extend the Picture Viewer with App Connect for Windows Phone.

To enable application launch from the share link in the picture viewer, add the Photos_Extra_Share extension to your application manifest file. When your application launches from the picture viewer, a parameter named FileId is passed to your application via the deep link URI. The parameter value, the file ID, corresponds to the picture that your application was launched from. Using the file ID, you can provide a rich user experience for sharing pictures to a web service.

From left to right, the following image shows how to navigate to a picture-sharing application from the picture viewer using App Connect.

OEM_OemMoAppDevGuide_SharePicker

When viewing a picture in the picture viewer, tap the Application Bar at the bottom of the screen and click the link named share. From the list of applications on the SHARE page, tap the application link to launch the application.

To enable application launch from the picture viewer via the share link, add the following extension to the application manifest file, WMAppManifest.xml.

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

For more information, see How to: Extend the Share Picker with App Connect for Windows Phone.

It is also possible to have multiple extensions declared in the Extensions element. For example, if you want your application to be visible from the picture viewer and the Pictures Hub, your extension declarations would appear as follows in the application manifest file, WMAppManifest.xml.

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

There are several application certification requirements to consider when developing an application that uses App Connect to extend the pictures experience. For more information, see Additional Requirements for Specific Application Types.

Did you find this helpful?
(1500 characters remaining)