Registering Extensions

With the entrance of Visual Studio 2012 we saw a new interface to edit your WMAppManifest file. This is a great tool to help you properly setup your app’s meta data. There is one limitation you should be aware of… there is no support for extensions. What are extensions? They are the added functionality that lets you tie your app into other parts of the OS and user experience. This blog post will cover the extensions for photos, but the process is the same for other extensions.

Here is a list of the photo related extensions:

Extension point Extension name URI keywords Learn more…
Photos Hub Photos_Extra_Hub 7.1, 8.0 Extending the Photos Hub for Windows Phone
Share picker Photos_Extra_Share ShareContent, FileId 7.1, 8.0 Extending the share picker for Windows Phone
Rich media app Photos_Rich_Media_Edit RichMediaEdit, token 8.0 Rich media extensibility for Windows Phone 8
Photo edit picker Photos_Extra_Image_Editor EditPhotoContent, FileId 8.0 Extending the photo edit picker for Windows Phone 8
Photo apps picker Photos_Extra_Viewer token 7.1 Extending the photo apps picker for Windows Phone 7

Each extension has it’s own target, make sure you are using the right one for your app. In my case, I am targeting Windows Phone 8 only. So I’ll be using all of the above except for the “Photos_Extra_Viewer” extension (it only targets WP7).

Now comes the confusing part. when you open your WMAppManifest file in Visual Studio 2012, you’ll be greeted with the new editor (image below, click for full size).

editor1new

If you were to look for a way to give your app extensibility, you won’t find any options in the new editor to do that. So what do you do? Edit the XML manually.

Here’s how:

  1. Go to your Solution Explorer
  2. Expand the “Properties” folder
  3. Right click on WMAppManifest.xml file
  4. Select XML (Text) editor

editor2

Visual Studio will open the file in the text editor and you will be able to make direct changes to your file. You’ll even have IntelliSense support to help guide you. With the file open, create a new Extensions parent ( like this: <Extensions></Extensions> ) inside the <App></App> parent and add the extensions you want your app to use.

Here are mine (click image for full size):

editor3

That’s it! Your app will now register the extensions with the OS. I recommend reading this section of the documentation on Photo Extensibility for Windows Phone. It will give you a better understanding of how this works, pitfalls to avoid and possible incompatibilities.  Armed with this information, you will be well on your way to providing the user with a more integrated experience.

Good luck and Happy Coding!

2 thoughts on “Registering Extensions

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.