user1510539 user1510539 - 1 month ago 5
C# Question

Is there a way to request another app to be opened side by side in UWP?

Say if I want to request a translator to be opened in the top window. An pass some string for it to translate.

Is that even possible?


You can launch the default app for a given URI simply with the Launcher class, for example:

// The URI to launch
var uri = new Uri(@"");

// Launch the URI
var success = await Windows.System.Launcher.LaunchUriAsync(uri);

if (success)
    // URI launched
    // URI launch failed

This also supports custom URI schemes, so you could use a URI like ms-drive-to:?cp=40.726966~-74.006076 to launch the driving app, and get directions to drive to that point in New York.

Similarly, you can register your own URI scheme so that you can be launched. So, if you can't find an app that handles translation via URI activation, you could write own that could take URIs of the form translate:{string}&from=en&to=es And then have that launchable from other apps