Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
61 out of 85 rated this helpful - Rate this topic

App contracts and extensions (Windows Runtime apps)

Applies to Windows and Windows Phone

Apps use contracts and extensions to declare the interactions that they support with other apps. These apps must include required declarations in the package manifest and call required APIs to communicate with other contract participants.

Contracts A contract is like an agreement between one or more apps. Contracts define the requirements that apps must meet to participate in these unique interactions.

For example, consider sharing information between two apps. The app that shares content out supports a source contract by meeting specific requirements, while the app that receives the shared content supports a target contract by meeting a different set of requirements. Neither app needs to know anything about the other. Every app that participates in the sharing contract can be confident that the sharing workflow is completely supported.

Extensions An extension is like an agreement between an app and the operating system. Extensions lets app developers extend or customize standard features primarily for use in their apps and potentially for use in other apps.

Use the package manifest to declare extensions. For example, an app can declare that it handles files with certain file extensions, or it can declare that it uses a particular dynamic-link library. In Microsoft Visual Studio, use the Declarations tab. If you are creating the package manually, see the Extensions element.

These next sections describe the various built-in app contracts and extensions.

  • Applies to Windows

Account picture provider (extension)

When users decide to change their account picture, they can either select an existing picture or use an app to take a new one. If your app can take pictures, you can use this extension to have Windows list your app in the Account Picture Settings control panel. From there, users can select it to create a new account picture.

For more info about this extension, see the UserInformation reference topic. You can also check out our Account picture name sample.

  • Applies to Windows

AutoPlay (extension)

When the user connects a device to a computer, Windows fires an AutoPlay event. This extension enables your app to be listed as an AutoPlay choice for the one or more AutoPlay events.

For more info about this extension, see Auto-launching with AutoPlay.

Background tasks (extension)

Apps can use background tasks to run app code even when the app is suspended. Background tasks are intended for small work items that require no interaction with the user.

For more info, see Supporting your app with background tasks and Introduction to Background Tasks.

  • Applies to Windows Phone

Update task (extension)

The Update task is a background task that is run directly after the user updates your app to a newer version. This gives your app the opportunity to perform configuration tasks, like setting up a push notification channel, without requiring the user to launch the updated app first.

For more info about this extension, see How to use the Update Task.

Cached file updater contract

You can provide updates for particular files to help users who want to use your app as a central repository to track and maintain files. For example, Microsoft OneDrive can track a file to ensure that the user sees the latest version of the file and trigger updates to the file if the OneDrive app can provide a newer version. Additionally, if the user saves a newer version of a tracked file, OneDrive can trigger an update to its version of the file to ensure that OneDrive always has the newest version.

See Integrating with file picker contracts and Quickstart: Integrating with file picker contracts.

  • Applies to Windows

Camera settings (extension)

Device manufacturers can use a Windows Store device app to customize the flyout that displays more camera options. The More options flyout can appear with apps that use the CameraCaptureUI class to capture photos. For more info, see How to customize camera options (Windows Store device apps).

  • Applies to Windows

Contact picker (extension)

This extension enables your app to register to provide contact data. Your app is included in the list of apps that Windows displays whenever the user needs access to their contacts.

For more info about this extension, see the Windows.ApplicationModel.Contacts.Provider reference topic. You can also check out Managing user contacts.

File activation (extension)

Files that have the same file name extension are of the same file type. Your app can use existing, well known file types, such as .txt, or create a new file type. The file activation extension enables you to define a new file type or register to handle a file type.

See How to handle file activation.

File Open Picker contract

You can help users pick files from your app directly while they are using another app. Users gain freedom and flexibility to choose files that are stored and presented by apps.

Participating in this contract helps you increase the popularity and adoption of your app. For more info, see Integrating with file picker contracts.

File Save Picker contract

You can help users save files to your app directly while they are using another app. Users gain freedom and flexibility to save files to your app so they can quickly and easily access the file when they switch to your app.

Participating in this contract helps you increase the popularity and adoption of your app. For more info, see Integrating with file picker contracts.

  • Applies to Windows

Game Explorer (extension)

Your app can register with Windows as a game. To do this, you must create a Game Definition File (GDF), build it as a binary resource in your app, and declare that resource in the package manifest.

When you provide a GDF file for your game, Windows can limit access to the game when the user has enabled family safety features. For more info, see Creating a GDF file.

  • Applies to Windows

Play To contract

You can help your users play digital media to connected DLNA devices from within your app. Users tap the Connect charm and then the Play To button, confident that your app will play their media to the DLNA device.

Participating in this contract makes your app easy to use and encourages users to remain in your app for longer periods of time. For more info, see Streaming media to devices using Play To.

  • Applies to Windows

Print task settings (extension)

Device manufacturers can use a Windows Store device app to customize the flyout that displays advanced print settings. For more info, see How to customize print settings (Windows Store device apps).

  • Applies to Windows

URI activation (extension)

Your app can use existing URI schemes, such as mailto, or create a custom URI scheme. The URI activation extension enables you to define a custom URI scheme or register to handle an existing URI scheme.

See How to handle URI activation.

  • Applies to Windows

Search contract

You can add a search pane to your app so users can search not only your app's content but content from other apps as well. Users can also transfer the search query itself to other apps. When you participate in this contract, you agree to make your app's content searchable by other participants and to present search results from those participants in your app.

Participating in this contract helps you gain traffic and usage for your app. For more info, see Adding search to an app.

  • Applies to Windows

Settings contract

You can provide quick, in-context access to settings that affect the user's experience with your app.

Participating in this contract ensures that your app is consistent with the Windows settings model. For more info, see Adding app settings.

Share contract

You can help users share content from your app with another app or service, and vice versa. Participating in the Share contract means that you don't have to write extra code or provide other developers with an SDK for your app just to share content. Apps that support the Share contract can automatically share content to and from any other app that also supports the contract.

Participating in this contract helps you gain traffic and usage for your app. For more info, see Adding share.

SSL/certificates (extension)

Digital certificates are used to authenticate one entity to another. For example, certificates are often used to authenticate a user to web services over SSL. This extension enables you to install a digital certificate with your app.

See Encrypting data and working with certificates.

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.