Skip to content

Commit f8d1b03

Browse files
committed
docs: develop-launch
Modernize documentation by updating legacy references. Batch: develop-launch Files changed: 6 Proposals applied: 13
1 parent 25a3c6f commit f8d1b03

6 files changed

Lines changed: 11 additions & 64 deletions

File tree

hub/apps/develop/launch/handle-file-activation.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dev_langs:
1515

1616
# Handle file activation in a Windows app
1717

18-
Your app can register to become the default handler for a certain file type. Both Windows desktop applications and Universal Windows Platform (UWP) apps can register to be a default file handler. If the user chooses your app as the default handler for a certain file type, your app will be activated when that type of file is launched.
18+
Your app can register to become the default handler for a certain file type. Both Windows desktop applications and WinUI apps can register to be a default file handler. If the user chooses your app as the default handler for a certain file type, your app will be activated when that type of file is launched.
1919

2020
We recommend that you only register for a file type if you expect to handle all file launches for that type of file. If your app only needs to use the file type internally, then you don't need to register to be the default handler. If you do choose to register for a file type, you must provide the end user with the functionality that is expected when your app is activated for that file type. For example, a picture viewer app may register to display a .jpg file. For more info on file associations, see [Guidelines for file types and URIs](../files/index.md).
2121

@@ -47,7 +47,7 @@ The app receives activation events only for the file extensions listed in the pa
4747
| **Info Tip** | Specify the [info tip](/windows/win32/shell/fa-progids) for a group of file types. This tool tip text appears when the user hovers on the icon for a file of this type. |
4848
| **Name** | Choose a name for a group of file types that share the same display name, logo, info tip, and edit flags. Choose a group name that can stay the same across app updates. **Note** The Name must be in all lower case letters. |
4949
| **Content Type** | Specify the MIME content type, such as **image/jpeg**, for a particular file type. **Important Note about allowed content types:** Here is an alphabetic list of MIME content types that you cannot enter into the package manifest because they are either reserved or forbidden: **application/force-download**, **application/octet-stream**, **application/unknown**, **application/x-msdownload**. |
50-
| **File type** | Specify the file type to register for, preceded by a period, for example, “.jpeg”. **Reserved and forbidden file types:** See [Reserved URI scheme names and file types](reserved-uri-scheme-names.md) for an alphabetic list of file types for built-in apps that you can't register for your UWP apps because they are either reserved or forbidden. |
50+
| **File type** | Specify the file type to register for, preceded by a period, for example, “.jpeg”. **Reserved and forbidden file types:** See [Reserved URI scheme names and file types](reserved-uri-scheme-names.md) for an alphabetic list of file types for built-in apps that you can't register for your WinUI apps because they are either reserved or forbidden. |
5151

5252
2. Enter `alsdk` as the **Name**.
5353
3. Enter `.alsdk` as the **File Type**.
@@ -93,14 +93,6 @@ protected override void OnFileActivated(FileActivatedEventArgs args)
9393
}
9494
```
9595

96-
```vb
97-
Protected Overrides Sub OnFileActivated(ByVal args As Windows.ApplicationModel.Activation.FileActivatedEventArgs)
98-
' TODO: Handle file activation
99-
' The number of files received is args.Files.Size
100-
' The name of the first file is args.Files(0).Name
101-
End Sub
102-
```
103-
10496
```cppwinrt
10597
void App::OnFileActivated(Windows::ApplicationModel::Activation::FileActivatedEventArgs const& args)
10698
{

hub/apps/develop/launch/handle-uri-activation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.localizationpriority: medium
1010

1111
# Handle URI activation
1212

13-
Learn how to register an app to become the default handler for a Uniform Resource Identifier (URI) scheme name. Both Windows desktop apps and Universal Windows Platform (UWP) apps can register to be a default handler for a URI scheme name. If the user chooses your app as the default handler for a URI scheme name, your app will be activated every time that type of URI is launched.
13+
Learn how to register an app to become the default handler for a Uniform Resource Identifier (URI) scheme name. WinUI apps can register to be a default handler for a URI scheme name. If the user chooses your app as the default handler for a URI scheme name, your app will be activated every time that type of URI is launched.
1414

1515
We recommend that you only register for a URI scheme name if you expect to handle all URI launches for that type of URI scheme. If you do choose to register for a URI scheme name, you must provide the end user with the functionality that is expected when your app is activated for that URI scheme. For example, an app that registers for the mailto: URI scheme name should open to a new e-mail message so that the user can compose a new e-mail. For more info on URI associations, see [Files, folders, and libraries](../files/index.md).
1616

hub/apps/develop/launch/launch-default-app.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Note that many WinRT APIs will work with other desktop apps with package identit
4747

4848
## Call LaunchUriAsync to launch a URI
4949

50-
Use the [LaunchUriAsync](/uwp/api/windows.system.launcher.launchuriasync) method to launch a URI. When you call this method, your app must be the foreground app, that is, it must be visible to the user. This requirement helps ensure that the user remains in control. To meet this requirement, make sure that you tie all URI launches directly to the UI of your app. The user must always take some action to initiate a URI launch. In a UWP app, if you attempt to launch a URI and your app isn't in the foreground, the launch will fail and your error callback will be invoked.
50+
Use the [LaunchUriAsync](/uwp/api/windows.system.launcher.launchuriasync) method to launch a URI. When you call this method, your app must be the foreground app, that is, it must be visible to the user. This requirement helps ensure that the user remains in control. To meet this requirement, make sure that you tie all URI launches directly to the UI of your app. The user must always take some action to initiate a URI launch.
5151

5252
First create a [System.Uri](/dotnet/api/system.uri) object to represent the URI, then pass that to the [LaunchUriAsync](/uwp/api/windows.system.launcher.launchuriasync) method. Use the return result to see if the call succeeded, as shown in the following example.
5353

@@ -170,7 +170,7 @@ Use the **bingmaps:**, **ms-drive-to:**, and **ms-walk-to:** URI schemes to laun
170170

171171
:::image type="content" source="images/mapnyc.png" alt-text="A screenshot of the Windows Maps app.":::
172172

173-
To use the map control in your UWP app, see [Display maps with 2D, 3D, and Streetside views](/windows/uwp/maps-and-location/display-maps). If you're using Windows App SDK 1.5 or later in a WinUI 3 app or other desktop app, you can use the [MapControl](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.mapcontrol).
173+
To use the map control in your WinUI app, see [MapControl](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.mapcontrol).
174174

175175
### Messaging app URI scheme
176176

@@ -201,11 +201,7 @@ Use the **ms-photos:** URI scheme to launch the Photos app to view an image or e
201201
| View an image | `ms-photos:viewer?fileName=c:\users\userName\Pictures\image.jpg` |
202202
| Edit a video | `ms-photos:videoedit?InputToken=123abc&Action=Trim&StartTime=01:02:03` |
203203

204-
> [!NOTE]
205-
> If you are launching the Photos app from a UWP app, the URIs to edit a video or display an image are only available on desktop.
206-
207204
The following table lists additional supported URI schemes for the Photos app:
208-
209205
| URI scheme |Results |
210206
|------------|--------|
211207
| `ms-photos:viewer?fileName={filename}` | Launches the Photos app to view the specified image where {filename} is a fully-qualified path name. For example: `c:\users\userName\Pictures\ImageToView.jpg` |

hub/apps/develop/launch/launch-people-app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.localizationpriority: medium
1515
>
1616
> This documentation is maintained for reference purposes for developers working with older Windows versions.
1717
18-
This topic describes the **ms-people:** URI scheme. Your WinUI, UWP, and other Windows desktop apps can use this URI scheme to launch the People app for specific actions.
18+
This topic describes the **ms-people:** URI scheme. Your WinUI and other Windows desktop apps can use this URI scheme to launch the People app for specific actions.
1919

2020
## ms-people: URI scheme reference
2121

hub/apps/develop/launch/launch-settings.md

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The following Windows Runtime (WinRT) APIs are used in this topic:
2525
- [PreferredApplicationPackageFamilyName](/uwp/api/windows.system.launcheroptions.preferredapplicationpackagefamilyname)
2626
- [DesiredRemainingView](/uwp/api/windows.system.launcheroptions.desiredremainingview)
2727

28-
Note that the WinRT APIs used in this topic can be used in both UWP apps, WinUI apps, and other desktop apps. To read more about enabling your desktop app to work with WinRT APIs, see [Call Windows Runtime APIs in desktop apps](/windows/apps/desktop/modernize/desktop-to-uwp-enhance).
28+
Note that the WinRT APIs used in this topic can be used in both WinUI and other desktop apps. To read more about enabling your desktop app to work with WinRT APIs, see [Call Windows Runtime APIs in desktop apps](/windows/apps/desktop/modernize/desktop-to-uwp-enhance).
2929

3030
## How to launch Settings
3131

@@ -72,25 +72,20 @@ The following sections describe different categories of ms-settings URIs used to
7272
- [Accounts](#accounts)
7373
- [Apps](#apps)
7474
- [Control Center](#control-center)
75-
- [Cortana](#cortana)
7675
- [Devices](#devices)
7776
- [Ease of access](#ease-of-access)
7877
- [Extras](#extras)
7978
- [Family Group](#family-group)
8079
- [Gaming](#gaming)
81-
- [Mixed reality](#mixed-reality)
8280
- [Network and internet](#network-and-internet)
8381
- [Personalization](#personalization)
8482
- [Phone](#phone)
8583
- [Privacy](#privacy)
8684
- [Search](#search)
8785
- [Sound](#sound)
88-
- [Surface Hub](#surface-hub)
8986
- [System](#system)
9087
- [Time and language](#time-and-language)
9188
- [Update and security](#update-and-security)
92-
93-
> [!NOTE]
9489
> The availability of some settings pages varies by Windows version and SKU. For some settings, the URI column also captures some usage information and any additional requirements that must be met for a page to be available.
9590
9691
### Accounts
@@ -129,22 +124,6 @@ The following sections describe different categories of ms-settings URIs used to
129124
|-------------|-----|
130125
| Control center | ms-settings:controlcenter |
131126

132-
### Cortana
133-
134-
|Settings page| URI |
135-
|-------------|-----|
136-
| Cortana across my devices | ms-settings:cortana-notifications |
137-
| More details | ms-settings:cortana-moredetails |
138-
| Permissions & History | ms-settings:cortana-permissions |
139-
| Searching Windows | ms-settings:cortana-windowssearch |
140-
| Talk to Cortana | ms-settings:cortana-language<br/>ms-settings:cortana<br/>ms-settings:cortana-talktocortana |
141-
142-
> [!IMPORTANT]
143-
> Cortana voice assistance in Windows as a standalone app was retired in the spring of 2023. For more information, see [End of support for Cortana](https://support.microsoft.com/topic/end-of-support-for-cortana-d025b39f-ee5b-4836-a954-0ab646ee1efa).
144-
145-
> [!NOTE]
146-
> This Settings section on desktop will be called Search when the PC is set to regions where Cortana is not currently available or Cortana has been disabled. Cortana-specific pages (Cortana across my devices, and Talk to Cortana) will not be listed in this case.
147-
148127
### Devices
149128

150129
|Settings page| URI |
@@ -207,16 +186,6 @@ The following sections describe different categories of ms-settings URIs used to
207186
| Playing a game full screen | ms-settings:quietmomentsgame |
208187
| TruePlay | ms-settings:gaming-trueplay (**As of Windows 10, version 1809 (10.0; Build 17763), this feature is removed from Windows**) |
209188

210-
### Mixed reality
211-
212-
> [!NOTE]
213-
> These settings are only available if the [Mixed Reality Portal](https://apps.microsoft.com/detail/9ng1h8b3zc7m) app is installed.
214-
215-
> [!IMPORTANT]
216-
> Windows Mixed Reality devices are not supported with Windows 11, version 24H2 and newer.
217-
>
218-
> Windows Mixed Reality support is limited to Windows 10, version 20H2 through Windows 11, version 23H2.
219-
220189
| Settings page | URI |
221190
|---------------|-----|
222191
| Audio and speech | ms-settings:holographic-audio |
@@ -267,7 +236,7 @@ The following sections describe different categories of ms-settings URIs used to
267236

268237
|Settings page| URI |
269238
|-------------|-----|
270-
| Your phone | ms-settings:mobile-devices<br/>ms-settings:mobile-devices-addphone<br/>ms-settings:mobile-devices-addphone-direct (Opens **Your Phone** app) |
239+
| Phone Link | ms-settings:mobile-devices<br/>ms-settings:mobile-devices-addphone<br/>ms-settings:mobile-devices-addphone-direct (Opens **Phone Link** app) |
271240
| Device Usage | ms-settings:deviceusage |
272241

273242
### Privacy
@@ -330,16 +299,6 @@ The following sections describe different categories of ms-settings URIs used to
330299
| Audio device properties<br/>(specific device) | ms-settings:sound-properties?endpointId={0.0.0.00000000}.{aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb}<br/><br/>**Note:** User of URI must know the `endpointId` string to use. |
331300
| Audio device properties<br/>(specific device) | ms-settings:sound-properties?interfaceId=\\\\?\\SWD#MMDEVAPI#{3.0.0.00000003}.{bbbbbbbb-1111-2222-3333-cccccccccccc}#{cccccccc-2222-3333-4444-dddddddddddd}<br/><br/>**Note:** User of URI must know the `interfaceId` string to use and the string must be escaped correctly before sending. |
332301

333-
### Surface Hub
334-
335-
|Settings page| URI |
336-
|-------------|-----|
337-
| Accounts | ms-settings:surfacehub-accounts |
338-
| Session cleanup | ms-settings:surfacehub-sessioncleanup |
339-
| Team Conferencing | ms-settings:surfacehub-calling |
340-
| Team device management | ms-settings:surfacehub-devicemanagement |
341-
| Welcome screen | ms-settings:surfacehub-welcome |
342-
343302
### System
344303

345304
|Settings page| URI |

hub/apps/develop/launch/launch-the-default-app-for-a-file.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.localizationpriority: medium
1010

1111
# Launch the default app for a file
1212

13-
Learn how to launch the default app for a file from your WinUI, Universal Windows Platform (UWP), or other desktop app. Many apps need to work with files that they can't handle themselves. For example, e-mail apps receive a variety of file types and need a way to launch these files in their default handlers. These steps show how to use the [Windows.System.Launcher](/uwp/api/Windows.System.Launcher) Windows Runtime (WinRT) API to launch the default handler for a file that your app can't handle itself.
13+
Learn how to launch the default app for a file from your WinUI or other desktop app. Many apps need to work with files that they can't handle themselves. For example, e-mail apps receive a variety of file types and need a way to launch these files in their default handlers. These steps show how to use the [Windows.System.Launcher](/uwp/api/Windows.System.Launcher) Windows Runtime (WinRT) API to launch the default handler for a file that your app can't handle itself.
1414

1515
## Important APIs
1616

@@ -19,7 +19,7 @@ The following APIs are featured in this topic:
1919
- [Windows.System.Launcher.LaunchFileAsync](/uwp/api/windows.system.launcher.launchfileasync)
2020

2121
> [!NOTE]
22-
> Unless noted otherwise, all the WinRT APIs used in this topic can be used in both UWP apps, WinUI apps, and other desktop apps. To read more about enabling your desktop app to work with WinRT APIs, see [Call Windows Runtime APIs in desktop apps](/windows/apps/desktop/modernize/desktop-to-uwp-enhance).
22+
> Unless noted otherwise, all the WinRT APIs used in this topic can be used in both WinUI apps and other desktop apps. To read more about enabling your desktop app to work with WinRT APIs, see [Call Windows Runtime APIs in desktop apps](/windows/apps/desktop/modernize/desktop-to-uwp-enhance).
2323
2424
## Get the file object
2525

@@ -462,7 +462,7 @@ void MainPage::DefaultLaunch()
462462

463463
## Remarks
464464

465-
Your app can't select the app that is launched. The user determines which app is launched. The user can select either a UWP app or a Windows desktop app.
465+
Your app can't select the app that is launched. The user determines which app is launched. The user can select either a WinUI app or a Windows desktop app.
466466

467467
When launching a file, your app must be the foreground app, that is, it must be visible to the user. This requirement helps ensure that the user remains in control. To meet this requirement, make sure that you tie all file launches directly to the UI of your app. Most likely, the user must always take some action to initiate a file launch.
468468

0 commit comments

Comments
 (0)