4

I'm currently looking for a way to programmatically launch a modern (uwp) application inside an app container using the available Win32 APIs.

I don't want to launch the app through a protocol '://app'.

Instead I want to create the app container myself and then load the UWP app inside that to have access to all memory etc.

Is this possible, and if so how?

AlexB
  • 7,302
  • 12
  • 56
  • 74
  • 2
    I think this is possible. There should be a way to load a UWP application to a view of another UWP application. But there are no documentation availabe in msdn – Suneesh Oct 15 '15 at 06:38
  • 1
    Have you found a solution? – nicruo Feb 04 '16 at 11:07

1 Answers1

-3

Not sure if this helps, but is this what you are looking for? This answer and blog post are in C#. http://blogs.windows.com/buildingapps/2015/09/22/using-cross-app-communication-to-make-apps-work-together-10-by-10/

To deeplink from one app to another you need to add a protocol declaration in the Package.appxmanifest of the app you want to navigate to.

From the container app you can launch the app that implements the protocol by using:

Uri uri = new Uri("your-protocol-name");
await Launcher.LaunchUriAsync(uri);

If you want to start a specific app you have to add the unique app name that you get when you register your app:

var options = new LauncherOptions();
options.TargetApplicationPackageFamilyName = "12345.your.app";
Uri uri = new Uri("com.contoso.showproduct:?ProductId=3748937");
await Launcher.LaunchUriAsync(uri, options);

You can pass data to the new app with query parameters in your launching Uri. There is also a way to retrieve data from the other app using App Services.

Fabian N.
  • 3,807
  • 2
  • 23
  • 46
René Maat
  • 10
  • 3