Udostępnij za pośrednictwem


LauncherOptions.TargetApplicationPackageFamilyName Property

Definition

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.

public:
 property Platform::String ^ TargetApplicationPackageFamilyName { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring TargetApplicationPackageFamilyName();

void TargetApplicationPackageFamilyName(winrt::hstring value);
public string TargetApplicationPackageFamilyName { get; set; }
var string = launcherOptions.targetApplicationPackageFamilyName;
launcherOptions.targetApplicationPackageFamilyName = string;
Public Property TargetApplicationPackageFamilyName As String

Property Value

String

Platform::String

winrt::hstring

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.

Remarks

An application's PackageFamilyName can be obtained via the PackageID class

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

In some cases, when you call Launcher 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 property set to the package family name for the app package containing that app.

Two such cases are as follows:

  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).
  2. 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.

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.

Applies to