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).
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.
- Go to your Solution Explorer
- Expand the “Properties” folder
- Right click on WMAppManifest.xml file
- Select XML (Text) editor
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):
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”