Compartilhar via


XR-109: Linking Between Apps

Version 1.0, 3/1/2020

Titles must include the target user when linking to another app on the console.

More Information

When linking between apps or titles, the correct user context must be maintained between the original title and the app being linked to. If one user's game links to the Achievements app, that same user's achievements should be shown, not a different user's achievements, nor should the current user be asked to sign in to the Achievements app to continue.

When linking from one title or app to another, as shown in the following example, titles must pass the target user's context into the LaunchUriAsync call:

auto uriString = ref new Platform::String(L"cubesra://default");
auto uri = ref new Windows::Foundation::Uri(uriString);
auto options = ref new Windows::System::LauncherOptions();
options->Context = _currentUser;
Windows::System::Launcher::LaunchUriAsync(uri, options);

Passing the target user's context ensures that the app will be launched in that user's context, and the user will see the intended content. Failure to pass user context will result in the system choosing a user context to launch the app in, which can often be incorrect, especially in cases where multiple users are signed in to the system, or a new user signs in or switches context within the game.

When linking between apps, users expect to remain in the correct user context between titles and apps. For example, if a button in a game is labeled "Show my achievements," users expect the button to take them not just to the Achievements app, but to their version of the Achievements app, with all the content they have unlocked. In a console where multiple users may be logged in at the same time, it is the responsibility of the title to pass in the correct user when linking to another app or title on the system.