Skip to content

Commit 9db9e02

Browse files
committed
Merged PR 21313: Add more context around PFN property being optional or required
Add more context around the TargetApplicationPackageFamilyName property being optional or required
1 parent 6d6f1e3 commit 9db9e02

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

windows.system/launcher_launchuriasync_569877360.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,35 @@ public Windows.Foundation.IAsyncOperation<bool> LaunchUriAsync(Windows.Foundatio
1111
# Windows.System.Launcher.LaunchUriAsync
1212

1313
## -description
14+
1415
Starts the default app associated with the URI scheme name for the specified URI, using the specified options and input data.
1516

1617
## -parameters
18+
1719
### -param uri
20+
1821
The URI.
1922

2023
### -param options
24+
2125
The launch options for the app.
2226

27+
> [!IMPORTANT]
28+
> The [TargetApplicationPackageFamilyName](launcheroptions_targetapplicationpackagefamilyname.md) property of the *options* parameter, while sometimes optional, is required for this overload of the **LaunchUriAsync** method.
29+
2330
### -param inputData
31+
2432
The input data for the app.
2533

2634
> [!IMPORTANT]
2735
> The amount of data that can be transferred must not exceed 100 KB.
2836
2937
## -returns
38+
3039
Returns **true** if the default app for the URI scheme was launched; **false** otherwise.
3140

3241
## -remarks
42+
3343
Unless you are calling this API from a Windows desktop application, this API must be called from within an ASTA thread (also known as the UI thread).
3444

3545
This API may also be called from a Windows desktop application.
@@ -39,4 +49,5 @@ This API launches the default app for the scheme whether it be a Universal Windo
3949
## -examples
4050

4151
## -see-also
52+
4253
[LaunchUriAsync(Uri)](launcher_launchuriasync_53691900.md), [LaunchUriAsync(Uri, LauncherOptions)](launcher_launchuriasync_68890748.md)

windows.system/launcheroptions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ In a desktop app, before using an instance of this class in a way that displays
1717

1818
## -remarks
1919

20+
In some cases, when you call [Launcher](launcher.md) static methods to launch an app associated with a file type or URI protocol, you must specify exactly which app you want to be launched by passing a **LauncherOptions** parameter with the [TargetApplicationPackageFamilyName](launcheroptions_targetapplicationpackagefamilyname.md) property set to the package family name for the app package containing that app.
21+
22+
Two such cases are as follows:
23+
24+
1. You want to launch an app with a URI and pass extra input data to the launched app, using [Launcher.LaunchUriAsync(Uri, LauncherOptions, ValueSet)](launcher_launchuriasync_569877360.md).
25+
1. You want to launch an app with a URI and wait for the app to send output data back to your app, using any overload of [Launcher.LaunchUriForResultsAsync](launcher_launchuriforresultsasync_148601521.md).
26+
27+
In these cases, both the calling app and launched app need to agree on how to interpret the extra data passed from one app to the other. The calling app cannot launch any app that happens to be the default for that URI protocol. In other cases, the **TargetApplicationPackageFamilyName** property is optional.
28+
2029
### Version history
2130

2231
| Windows version | SDK version | Value added |

windows.system/launcheroptions_targetapplicationpackagefamilyname.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,28 @@ public string TargetApplicationPackageFamilyName { get; set; }
1010
# Windows.System.LauncherOptions.TargetApplicationPackageFamilyName
1111

1212
## -description
13-
The package family name of the target package that should be used to launch a file or URI. This property is optional.
13+
14+
The package family name of the target package that should be used to launch a file or URI. This property is optional in some cases. See **Remarks**.
1415

1516
## -property-value
16-
The package family name of the target package that should be used to launch a file or URI. This property is optional.
17+
18+
The package family name of the target package that should be used to launch a file or URI. This property is optional in some cases. See **Remarks**.
1719

1820
## -remarks
21+
1922
An application's PackageFamilyName can be obtained via the [PackageID class](/en-us/uwp/api/Windows.ApplicationModel.PackageId#Windows_ApplicationModel_PackageId_FamilyName)
2023

2124
A PackageFamilyName can vary depending on how an application has been published, but it will generally follow the form of `[package name]_[publisher_id]`. For example, an unpublished app has a family name similar to `c04742a8-1c87-41c1-b951-cc6e6f353400_g3nsfcgfwzqga`
2225

26+
In some cases, when you call [Launcher](launcher.md) static methods to launch an app associated with a file type or URI protocol, you must specify exactly which app you want to be launched by passing a [LauncherOptions](launcheroptions.md) parameter with the **TargetApplicationPackageFamilyName** property set to the package family name for the app package containing that app.
27+
28+
Two such cases are as follows:
29+
30+
1. You want to launch an app with a URI and pass extra input data to the launched app, using [Launcher.LaunchUriAsync(Uri, LauncherOptions, ValueSet)](launcher_launchuriasync_569877360.md).
31+
1. You want to launch an app with a URI and wait for the app to send output data back to your app, using any overload of [Launcher.LaunchUriForResultsAsync](launcher_launchuriforresultsasync_148601521.md).
32+
33+
In these cases, both the calling app and launched app need to agree on how to interpret the extra data passed from one app to the other. The calling app cannot launch any app that happens to be the default for that URI protocol.
34+
2335
## -examples
2436

2537
## -see-also

0 commit comments

Comments
 (0)